diff options
author | David Faure <faure@kde.org> | 2015-05-02 00:16:55 +0200 |
---|---|---|
committer | David Faure <faure@kde.org> | 2015-05-02 00:16:55 +0200 |
commit | 76e5b4412782b9c1757c8cdb3984f99566a57b96 (patch) | |
tree | ba93b16698e3da2a494d04e7130a35d64f7871a3 /src | |
parent | 87a661450b152206ab6768d1fc8e63db15dee400 (diff) | |
download | kconfig-76e5b4412782b9c1757c8cdb3984f99566a57b96.tar.gz kconfig-76e5b4412782b9c1757c8cdb3984f99566a57b96.tar.bz2 |
Fix kconf_update for spaces in paths
(CI says it happens on OSX)
Unittest it on Linux by exporting XDG_DATA_HOME with a space in it.
CCMAIL: kde-mac@kde.org
Diffstat (limited to 'src')
-rw-r--r-- | src/kconf_update/kconf_update.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/kconf_update/kconf_update.cpp b/src/kconf_update/kconf_update.cpp index 309bc3c2..7659e7b2 100644 --- a/src/kconf_update/kconf_update.cpp +++ b/src/kconf_update/kconf_update.cpp @@ -777,6 +777,7 @@ void KonfUpdate::gotScript(const QString &_script) log() << m_currentFilename << ": Running script '" << script << "'" << endl; } + QStringList args; QString cmd; if (interpreter.isEmpty()) { cmd = path; @@ -787,12 +788,12 @@ void KonfUpdate::gotScript(const QString &_script) m_skip = true; return; } - cmd = interpreterPath + ' ' + path; + cmd = interpreterPath; + args << path; } if (!m_arguments.isNull()) { - cmd += ' '; - cmd += m_arguments; + args += m_arguments; } QTemporaryFile scriptIn; @@ -834,7 +835,7 @@ void KonfUpdate::gotScript(const QString &_script) log() << "Script contents is:" << endl << scriptFile.readAll() << endl; } } - proc.start(cmd); + proc.start(cmd, args); if (!proc.waitForFinished(60000)) { logFileError() << "update script did not terminate within 60 seconds: " << cmd << endl; m_skip = true; |