Fixed typo preventing successful path rename on Win and modified ASSERT for Window...
authorDominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Tue, 8 Oct 2019 06:31:31 +0000 (08:31 +0200)
committerDominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Tue, 8 Oct 2019 06:31:31 +0000 (08:31 +0200)
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
src/csync/csync_exclude.cpp
test/testfolderwatcher.cpp

index 1bb66b15d303c209c083c584ba3246817493abaf..fe4f714931a937530155f9cdb50df6de71f2924f 100644 (file)
@@ -288,7 +288,11 @@ void ExcludedFiles::addManualExclude(const QByteArray &expr)
 
 void ExcludedFiles::addManualExclude(const QByteArray &expr, const QByteArray &basePath)
 {
+#if defined(_WIN32)
+    Q_ASSERT(basePath.size() >= 2 && basePath.at(1) == ':');
+#elif
     Q_ASSERT(basePath.startsWith('/'));
+#endif
     Q_ASSERT(basePath.endsWith('/'));
 
     auto key = basePath;
index fdd97701db7337ed1f3a57ee08954b9ddb687352..f515a1d60a68b33f347dcb2fefadefba51facae1 100644 (file)
@@ -146,7 +146,7 @@ private slots:
         mkdir(_rootPath + "/a0/b");
         mkdir(_rootPath + "/a0/b/c");
         touch(file);
-        mv(_rootPath + "/a0 ", _rootPath + "/a");
+        mv(_rootPath + "/a0", _rootPath + "/a");
         QVERIFY(waitForPathChanged(_rootPath + "/a/b/c/empty.txt"));
     }