mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Bugfix. Do not treat item type change as metadata update.
Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
parent
7f37cf866d
commit
ed2ad42502
@ -983,19 +983,21 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
|
||||
bool serverModified = item->_instruction == CSYNC_INSTRUCTION_NEW || item->_instruction == CSYNC_INSTRUCTION_SYNC
|
||||
|| item->_instruction == CSYNC_INSTRUCTION_RENAME || item->_instruction == CSYNC_INSTRUCTION_TYPE_CHANGE;
|
||||
|
||||
const auto isTypeChange = item->_instruction == CSYNC_INSTRUCTION_TYPE_CHANGE;
|
||||
|
||||
qCDebug(lcDisco) << "File" << item->_file << "- servermodified:" << serverModified
|
||||
<< "noServerEntry:" << noServerEntry;
|
||||
|
||||
// Decay server modifications to UPDATE_METADATA if the local virtual exists
|
||||
bool hasLocalVirtual = localEntry.isVirtualFile || (_queryLocal == ParentNotChanged && dbEntry.isVirtualFile());
|
||||
bool virtualFileDownload = item->_type == ItemTypeVirtualFileDownload;
|
||||
if (serverModified && !virtualFileDownload && hasLocalVirtual) {
|
||||
if (serverModified && !isTypeChange && !virtualFileDownload && hasLocalVirtual) {
|
||||
item->_instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
|
||||
serverModified = false;
|
||||
item->_type = ItemTypeVirtualFile;
|
||||
}
|
||||
|
||||
if (dbEntry.isVirtualFile() && (!localEntry.isValid() || localEntry.isVirtualFile) && !virtualFileDownload) {
|
||||
if (dbEntry.isVirtualFile() && (!localEntry.isValid() || localEntry.isVirtualFile) && !virtualFileDownload && !isTypeChange) {
|
||||
item->_type = ItemTypeVirtualFile;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user