From f993e7c555b1b7a0db40c69672f8fc1ca09de393 Mon Sep 17 00:00:00 2001 From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Tue, 8 Oct 2019 08:31:31 +0200 Subject: [PATCH] Fixed typo preventing successful path rename on Win and modified ASSERT for Window path styles Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- src/csync/csync_exclude.cpp | 4 ++++ test/testfolderwatcher.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp index 1bb66b15d..fe4f71493 100644 --- a/src/csync/csync_exclude.cpp +++ b/src/csync/csync_exclude.cpp @@ -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; diff --git a/test/testfolderwatcher.cpp b/test/testfolderwatcher.cpp index fdd97701d..f515a1d60 100644 --- a/test/testfolderwatcher.cpp +++ b/test/testfolderwatcher.cpp @@ -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")); }