From 873d79d3b5176be066f4aca0cc1e061d2845fd9e Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 11 Nov 2021 14:04:40 +0100 Subject: [PATCH] App: [skip ci] add program option --keep-deprecated-paths to keep old path names --- src/App/Application.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 7fb356f9a9..b112ee32b3 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -2084,6 +2084,7 @@ void parseProgramOptions(int ac, char ** av, const string& exe, variables_map& v ("response-file", value(),"Can be specified with '@name', too") ("dump-config", "Dumps configuration") ("get-config", value(), "Prints the value of the requested configuration key") + ("keep-deprecated-paths", "If set then config files are kept on the old location") ; // Declare a group of options that will be @@ -2390,6 +2391,10 @@ void Application::initConfig(int argc, char ** argv) variables_map vm; parseProgramOptions(argc, argv, mConfig["ExeName"], vm); + if (vm.count("keep-deprecated-paths")) { + mConfig["KeepDeprecatedPaths"] = "1"; + } + // extract home paths ExtractUserPath(); @@ -3053,7 +3058,7 @@ std::tuple getStandardPaths() void Application::ExtractUserPath() { - bool keepDeprecatedPaths = false; + bool keepDeprecatedPaths = mConfig.count("KeepDeprecatedPaths") > 0; // std paths mConfig["BinPath"] = mConfig["AppHomePath"] + "bin" + PATHSEP;