mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
ensure lnk shortcut files are converted to virtual files
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
2d0529c423
commit
85e71d47bf
@ -1731,6 +1731,15 @@ void ProcessDirectoryJob::processFileFinalize(
|
||||
item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_UPDATE_VFS_METADATA;
|
||||
}
|
||||
|
||||
if (_discoveryData->_syncOptions._vfs &&
|
||||
(item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) &&
|
||||
item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
|
||||
FileSystem::isLnkFile((_discoveryData->_localDir + path._local))) {
|
||||
item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_SYNC;
|
||||
item->_direction = SyncFileItem::Down;
|
||||
item->_type = CSyncEnums::ItemTypeVirtualFileDehydration;
|
||||
}
|
||||
|
||||
if (path._original != path._target && (item->_instruction == CSYNC_INSTRUCTION_UPDATE_VFS_METADATA || item->_instruction == CSYNC_INSTRUCTION_UPDATE_METADATA || item->_instruction == CSYNC_INSTRUCTION_NONE)) {
|
||||
ASSERT(_dirItem && _dirItem->_instruction == CSYNC_INSTRUCTION_RENAME);
|
||||
// This is because otherwise subitems are not updated! (ideally renaming a directory could
|
||||
|
||||
Loading…
Reference in New Issue
Block a user