From 606541e5611737a9e13148f7007df7670d74e132 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Tue, 24 Feb 2009 10:33:22 -0700 Subject: Fix update handling THis will prevent loading updates when -u is used, and prevent error messages in the log when -u is used. --- src/main.cpp | 22 +++++++++++----------- 1 file 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 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, -- cgit v1.2.3-70-g09d2