From fc0aeb53b16420db6cc7006fc55169a0317e2fb0 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 31 Oct 2019 10:41:38 +0100 Subject: [PATCH] Discovery: fix TestSyncVirtualFiles::testExtraFilesLocalDehydrated on windows On windows we do a test to know if we should change the case of the files, but that conflict with the test that checks if the file was still there when the filename is actually the same. Which can happen with virtual files as they have two representation (the one with and without suffix). --- src/libsync/discovery.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 5bd2ed006..7d2b4e599 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -892,11 +892,12 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo( } // The old file must have been deleted. - if (QFile::exists(_discoveryData->_localDir + base._path) + if (QFile::exists(_discoveryData->_localDir + originalPath) // Exception: If the rename changes case only (like "foo" -> "Foo") the // old filename might still point to the same file. && !(Utility::fsCasePreserving() - && originalPath.compare(path._local, Qt::CaseInsensitive) == 0)) { + && originalPath.compare(path._local, Qt::CaseInsensitive) == 0 + && originalPath != path._local)) { qCInfo(lcDisco) << "Not a move, base file still exists at" << originalPath; return false; } -- 2.30.2