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>
}
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);