From d70d4f61ec40dfc4c32e39b7eea9081368adfb6a Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 9 Nov 2022 16:36:38 +0100 Subject: [PATCH] properly escape a path when creating a test file during tests Signed-off-by: Matthieu Gallien --- test/testfolderwatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testfolderwatcher.cpp b/test/testfolderwatcher.cpp index d8c7da0924f7f..c8ac44d40d3f6 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());