prevents modifying real user config file
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 23 Nov 2022 15:56:35 +0000 (16:56 +0100)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Wed, 23 Nov 2022 16:34:05 +0000 (17:34 +0100)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
test/testfolderman.cpp

index 9689a8592d7ec0adc427417077db21bc3c499d5b..049deefa1f2ca88d8329df74d956ad34405a0ff0 100644 (file)
@@ -32,6 +32,9 @@ signals:
 private slots:
     void testLeaveShare()
     {
+        QTemporaryDir dir;
+        ConfigFile::setConfDir(dir.path()); // we don't want to pollute the user's config file
+
         constexpr auto firstSharePath = "A/sharedwithme_A.txt";
         constexpr auto secondSharePath = "A/B/sharedwithme_B.data";