Procházet zdrojové kódy

properly escape a path when creating a test file during tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Matthieu Gallien před 3 roky
rodič
revize
d70d4f61ec
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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());