diff options
author | Bertram <bertram@cegetel.net> | 2009-10-21 23:11:50 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-10-21 23:11:50 +0200 |
commit | f5f351c570708f4ca923eeecee483874e673a277 (patch) | |
tree | 9f40ab790df4ae198ba05f75890349727003b0a1 | |
parent | 7fc4b120bf35daa5d3d96eb565ec7d79ce153653 (diff) | |
download | mana-f5f351c570708f4ca923eeecee483874e673a277.tar.gz mana-f5f351c570708f4ca923eeecee483874e673a277.tar.bz2 mana-f5f351c570708f4ca923eeecee483874e673a277.tar.xz mana-f5f351c570708f4ca923eeecee483874e673a277.zip |
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.
-rw-r--r-- | src/main.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/main.cpp b/src/main.cpp index c05ce193..761f825d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -920,12 +920,6 @@ int main(int argc, char *argv[]) if (state != oldstate) { - // Load updates after exiting the update state - if (oldstate == STATE_UPDATE) - { - loadUpdates(); - } - //printf("State change: %d to %d\n", oldstate, state); oldstate = state; @@ -1025,19 +1019,20 @@ int main(int argc, char *argv[]) break; case STATE_UPDATE: + + // Determine which source to use for the update host + if (!options.updateHost.empty()) + updateHost = options.updateHost; + else + updateHost = loginData.updateHost; + setUpdatesDir(); + if (options.skipUpdate) { state = STATE_LOAD_DATA; } else { - // Determine which source to use for the update host - if (!options.updateHost.empty()) - updateHost = options.updateHost; - else - updateHost = loginData.updateHost; - - setUpdatesDir(); logger->log("State: UPDATE"); currentDialog = new UpdaterWindow(updateHost, homeDir + "/" + updatesDir); @@ -1047,7 +1042,10 @@ int main(int argc, char *argv[]) case STATE_LOAD_DATA: logger->log("State: LOAD DATA"); - // Add customdata directory + // Load the updates downloaded so far... + loadUpdates(); + + // Also add customdata directory ResourceManager::getInstance()->searchAndAddArchives( "customdata/", "zip", |