Vfs: Make move detection work with virtual files #7001

Previously a checksum computation could be done on a suffix-placeholder
file, making discovery believe that no move took place.
This commit is contained in:
Christian Kamm 2019-07-24 15:07:20 +02:00 committed by Kevin Ottens
parent 00dcf3ef59
commit e6990bd04e
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -881,7 +881,7 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
}
// Verify the checksum where possible
if (!base._checksumHeader.isEmpty() && item->_type == ItemTypeFile) {
if (!base._checksumHeader.isEmpty() && item->_type == ItemTypeFile && base._type == ItemTypeFile) {
if (computeLocalChecksum(base._checksumHeader, _discoveryData->_localDir + path._original, item)) {
qCInfo(lcDisco) << "checking checksum of potential rename " << path._original << item->_checksumHeader << base._checksumHeader;
if (item->_checksumHeader != base._checksumHeader) {