Просмотр исходного кода

properly escape a path when creating a test file during tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Matthieu Gallien 3 лет назад
Родитель
Сommit
d70d4f61ec
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      test/testfolderwatcher.cpp

+ 1 - 1
test/testfolderwatcher.cpp

@@ -147,7 +147,7 @@ private slots:
     void testACreate() { // create a new file
         QString file(_rootPath + "/foo.txt");
         QString cmd;
-        cmd = QString("echo \"xyz\" > %1").arg(file);
+        cmd = QString("echo \"xyz\" > \"%1\"").arg(file);
         qDebug() << "Command: " << cmd;
         system(cmd.toLocal8Bit());