Skip to content

Commit

Permalink
fixing path-with-space handling when saving toolcfg. refs #14506
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 14, 2024
1 parent d0f680a commit b5283f1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/netedit/tools/GNEPythonTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,7 @@ GNEPythonTool::loadConfiguration(const std::string& file) {

void
GNEPythonTool::saveConfiguration(const std::string& file) const {
// add python script
const char* pythonEnv = getenv("PYTHON");
const std::string python = (pythonEnv == nullptr) ? "python" : pythonEnv;
const char* sumoHomeEnv = getenv("SUMO_HOME");
const std::string sumoHome = (sumoHomeEnv == nullptr) ? "" : sumoHomeEnv + std::string("/");
// get command
std::string command = python + " " + sumoHome + myToolPath + " -C " + file + " ";
std::string command = getCommandPath() + " -C \"" + file + "\" ";
// add arguments
for (const auto& option : myPythonToolsOptions) {
// only write modified values
Expand Down

0 comments on commit b5283f1

Please sign in to comment.