Merge pull request #1487 from nextcloud/testSyncFileStatusTracker-winPath

Fix tests for Windows platform
This commit is contained in:
Michael Schuster 2019-10-20 21:48:36 +02:00 committed by GitHub
commit 325dd8732e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -288,7 +288,11 @@ void ExcludedFiles::addManualExclude(const QByteArray &expr)
void ExcludedFiles::addManualExclude(const QByteArray &expr, const QByteArray &basePath)
{
#if defined(Q_OS_WIN)
Q_ASSERT(basePath.size() >= 2 && basePath.at(1) == ':');
#else
Q_ASSERT(basePath.startsWith('/'));
#endif
Q_ASSERT(basePath.endsWith('/'));
auto key = basePath;

View 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"));
}