properly escape a path when creating a test file during tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2022-11-09 16:36:38 +01:00 committed by backportbot-nextcloud[bot]
parent c3bbe146e7
commit b414d43c23
1 changed files with 1 additions and 1 deletions

View File

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