mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
fix migration of existing windows shortcut files to placeholder
we cannot do a single call to convert the plain old file to be a dehydrated virtual file placeholder split the conversion into a separate initial API call fix transition from releases < 3.14 to current releases that have first class support for windows shortcuts (so called link files) Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
3c021166fa
commit
8ac293bfd4
@ -498,6 +498,13 @@ void PropagateDownloadFile::startAfterIsEncryptedIsChecked()
|
||||
}
|
||||
|
||||
qCDebug(lcPropagateDownload) << "dehydrating file" << _item->_file;
|
||||
if (FileSystem::isLnkFile(fsPath)) {
|
||||
const auto convertResult = vfs->convertToPlaceholder(fsPath, *_item);
|
||||
if (!convertResult) {
|
||||
qCCritical(lcPropagateDownload()) << "error when converting a shortcut file to placeholder" << convertResult.error();
|
||||
}
|
||||
}
|
||||
|
||||
auto r = vfs->dehydratePlaceholder(*_item);
|
||||
if (!r) {
|
||||
done(SyncFileItem::NormalError, r.error(), ErrorCategory::GenericError);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user