diff --git a/src/UpdaterOptions.cpp b/src/UpdaterOptions.cpp index 996e3a4..869fd06 100644 --- a/src/UpdaterOptions.cpp +++ b/src/UpdaterOptions.cpp @@ -70,7 +70,7 @@ void UpdaterOptions::parseOldFormatArgs(int argc, char** argv) } else if (key == "UpdateScriptFileName") { - script = value; + scriptPath = value; } else if (key == "AppFileName") { @@ -116,7 +116,7 @@ void UpdaterOptions::parse(int argc, char** argv) } if (parser.getValue("script")) { - script = parser.getValue("script"); + scriptPath = parser.getValue("script"); } if (parser.getValue("wait")) { diff --git a/src/UpdaterOptions.h b/src/UpdaterOptions.h index 082ab14..738261c 100644 --- a/src/UpdaterOptions.h +++ b/src/UpdaterOptions.h @@ -12,7 +12,7 @@ class UpdaterOptions UpdateInstaller::Mode mode; std::string installDir; std::string packageDir; - std::string script; + std::string scriptPath; long long waitPid; std::string logFile; diff --git a/src/main.cpp b/src/main.cpp index a777444..aed2f93 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,15 +49,15 @@ int main(int argc, char** argv) UpdateInstaller installer; UpdateScript script; - if (!options.script.empty()) + if (!options.scriptPath.empty()) { - script.parse(options.script); + script.parse(options.scriptPath); } LOG(Info,"started updater. install-dir: " + options.installDir + ", package-dir: " + options.packageDir + ", wait-pid: " + intToStr(options.waitPid) - + ", script-path: " + options.script + + ", script-path: " + options.scriptPath + ", mode: " + intToStr(options.mode)); installer.setMode(options.mode); diff --git a/src/tests/TestUpdaterOptions.cpp b/src/tests/TestUpdaterOptions.cpp index 012a551..1d5af1a 100644 --- a/src/tests/TestUpdaterOptions.cpp +++ b/src/tests/TestUpdaterOptions.cpp @@ -20,7 +20,7 @@ void TestUpdaterOptions::testOldFormatArgs() TEST_COMPARE(options.mode,UpdateInstaller::Setup); TEST_COMPARE(options.installDir,"/path/to/app"); TEST_COMPARE(options.packageDir,"/tmp/updater"); - TEST_COMPARE(options.script,"/tmp/updater/file_list.xml"); + TEST_COMPARE(options.scriptPath,"/tmp/updater/file_list.xml"); TEST_COMPARE(options.waitPid,123456); }