From ae4d8cee2ad7cbc0d93f906898aae693d89cf165 Mon Sep 17 00:00:00 2001 From: jerry Date: Wed, 28 May 2014 12:05:05 +0000 Subject: [PATCH] issue #3307 - Configuration file paths containing spaces don't work issue solved --- src/gui/src/MainWindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 9b0dd1a4..a06141ed 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -589,7 +589,12 @@ bool MainWindow::serverArgs(QStringList& args, QString& app) args << "--log" << logFilename; } - args << "-c" << configFilename() << "--address" << address(); + QString configFilename = this->configFilename(); +#if defined(Q_OS_WIN) + // wrap in quotes in case username contains spaces. + configFilename = QString("\"%1\"").arg(configFilename); +#endif + args << "-c" << configFilename << "--address" << address(); return true; }