瀏覽代碼

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());