From 4d1ce9deedfc96b261ad2f209715549284821a37 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sat, 14 Mar 2009 23:49:14 +0100 Subject: [PATCH] Properly handle whitespace in script paths --- src/client/execwrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/execwrapper.cpp b/src/client/execwrapper.cpp index cf5ac964..4958eb6c 100644 --- a/src/client/execwrapper.cpp +++ b/src/client/execwrapper.cpp @@ -50,14 +50,14 @@ void ExecWrapper::start(const BufferInfo &info, const QString &command) { // Make sure we don't execute something outside a script dir if(_scriptName.contains("../") || _scriptName.contains("..\\")) - emit error(tr("Name \"%1\" is invalid: / or ../ are not allowed!").arg(_scriptName)); + emit error(tr("Name \"%1\" is invalid: ../ or ..\\ are not allowed!").arg(_scriptName)); else { foreach(QString scriptDir, Quassel::scriptDirPaths()) { QString fileName = scriptDir + _scriptName; if(!QFile::exists(fileName)) continue; - _process.start(fileName + ' ' + params); + _process.start('"' + fileName + "\" " + params); return; } emit error(tr("Could not find script \"%1\"").arg(_scriptName)); -- 2.20.1