From: Olivier Goffart Date: Thu, 31 Oct 2019 09:41:38 +0000 (+0100) Subject: Discovery: fix TestSyncVirtualFiles::testExtraFilesLocalDehydrated on windows X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~161 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fc0aeb53b16420db6cc7006fc55169a0317e2fb0;p=nextcloud-desktop.git 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). --- 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; }