diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-02-24 10:33:22 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-02-24 10:33:22 -0700 |
commit | 606541e5611737a9e13148f7007df7670d74e132 (patch) | |
tree | 6f748fd3007959516c21b192852b84b4e2d110ae | |
parent | e15b8c360ac5171fe73b8b73fbe00eedba8970ff (diff) | |
download | mana-client-606541e5611737a9e13148f7007df7670d74e132.tar.gz mana-client-606541e5611737a9e13148f7007df7670d74e132.tar.bz2 mana-client-606541e5611737a9e13148f7007df7670d74e132.tar.xz mana-client-606541e5611737a9e13148f7007df7670d74e132.zip |
Fix update handling
THis will prevent loading updates when -u is used, and prevent error
messages in the log when -u is used.
-rw-r--r-- | src/main.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main.cpp b/src/main.cpp index bdc3941c..2c2ff0b6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -595,6 +595,7 @@ void parseOptions(int argc, char *argv[], Options &options) */ void loadUpdates() { + if (updatesDir.empty()) return; const std::string updatesFile = "/" + updatesDir + "/resources2.txt"; ResourceManager *resman = ResourceManager::getInstance(); std::vector<std::string> lines = resman->loadTextFile(updatesFile); @@ -983,8 +984,7 @@ int main(int argc, char *argv[]) } else { - int nextState = (options.skipUpdate) ? - LOADDATA_STATE : UPDATE_STATE; + int nextState = UPDATE_STATE; currentDialog = new ServerSelectDialog(&loginData, nextState); positionDialog(currentDialog, screenWidth, @@ -1044,18 +1044,18 @@ int main(int argc, char *argv[]) break; case UPDATE_STATE: - // 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"); - if (options.skipUpdate) { state = LOADDATA_STATE; } 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); positionDialog(currentDialog, screenWidth, |