From: Matthieu Gallien Date: Wed, 9 Nov 2022 15:36:38 +0000 (+0100) Subject: properly escape a path when creating a test file during tests X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~146^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d70d4f61ec40dfc4c32e39b7eea9081368adfb6a;p=nextcloud-desktop.git properly escape a path when creating a test file during tests Signed-off-by: Matthieu Gallien --- diff --git a/test/testfolderwatcher.cpp b/test/testfolderwatcher.cpp index d8c7da092..c8ac44d40 100644 --- a/test/testfolderwatcher.cpp +++ b/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());