Commit f5f351c570708f4ca923eeecee483874e673a277

  • avatar
  • Bertram <bertram @ceg…el.net>
  • Wed Oct 21 23:11:50 CEST 2009
Made the skip updates (-u) and set custom data path (-d) startup options work again, even separately.

Be aware, that skiping the updates download does still the already downloaded data files.

If needed, a "don't use updates" options should be made to explicitely get temporary rid of updates files.
src/main.cpp
(12 / 14)
  
920920
921921 if (state != oldstate)
922922 {
923 // Load updates after exiting the update state
924 if (oldstate == STATE_UPDATE)
925 {
926 loadUpdates();
927 }
928
929923 //printf("State change: %d to %d\n", oldstate, state);
930924
931925 oldstate = state;
10191019 break;
10201020
10211021 case STATE_UPDATE:
1022
1023 // Determine which source to use for the update host
1024 if (!options.updateHost.empty())
1025 updateHost = options.updateHost;
1026 else
1027 updateHost = loginData.updateHost;
1028 setUpdatesDir();
1029
10221030 if (options.skipUpdate)
10231031 {
10241032 state = STATE_LOAD_DATA;
10251033 }
10261034 else
10271035 {
1028 // Determine which source to use for the update host
1029 if (!options.updateHost.empty())
1030 updateHost = options.updateHost;
1031 else
1032 updateHost = loginData.updateHost;
1033
1034 setUpdatesDir();
10351036 logger->log("State: UPDATE");
10361037 currentDialog = new UpdaterWindow(updateHost,
10371038 homeDir + "/" + updatesDir);
10421042 case STATE_LOAD_DATA:
10431043 logger->log("State: LOAD DATA");
10441044
1045 // Add customdata directory
1045 // Load the updates downloaded so far...
1046 loadUpdates();
1047
1048 // Also add customdata directory
10461049 ResourceManager::getInstance()->searchAndAddArchives(
10471050 "customdata/",
10481051 "zip",