Преглед на файлове

properly escape a path when creating a test file during tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Matthieu Gallien преди 3 години
родител
ревизия
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());