diff --git a/Files/Filesystem/FilesystemOperations/Helpers/FilesystemHelpers.cs b/Files/Filesystem/FilesystemOperations/Helpers/FilesystemHelpers.cs index 4406ed48f396a..1bbe79c4a31df 100644 --- a/Files/Filesystem/FilesystemOperations/Helpers/FilesystemHelpers.cs +++ b/Files/Filesystem/FilesystemOperations/Helpers/FilesystemHelpers.cs @@ -657,17 +657,19 @@ public async Task CopyItemAsync(IStorageItemWithPath source, strin public async Task RecycleItemsFromClipboard(DataPackageView packageView, string destination, bool showDialog, bool registerHistory) { + if (!HasDraggedStorageItems(packageView)) + { + // Happens if you copy some text and then you Ctrl+V in Files + return ReturnResult.BadArgumentException; + } + var (handledByFtp, source) = await GetDraggedStorageItems(packageView); + if (handledByFtp) { // Not supported return ReturnResult.Failed; } - if (!source.Any()) - { - // Happens if you copy some text and then you Ctrl+V in Files - return ReturnResult.BadArgumentException; - } ReturnResult returnStatus = ReturnResult.InProgress; @@ -680,6 +682,7 @@ public async Task RecycleItemsFromClipboard(DataPackageView packag public async Task CopyItemsFromClipboard(DataPackageView packageView, string destination, bool showDialog, bool registerHistory) { var (handledByFtp, source) = await GetDraggedStorageItems(packageView); + if (handledByFtp) { var connection = await ServiceConnection; @@ -899,17 +902,19 @@ public async Task MoveItemAsync(IStorageItemWithPath source, strin public async Task MoveItemsFromClipboard(DataPackageView packageView, string destination, bool showDialog, bool registerHistory) { + if (!HasDraggedStorageItems(packageView)) + { + // Happens if you copy some text and then you Ctrl+V in Files + return ReturnResult.BadArgumentException; + } + var (handledByFtp, source) = await GetDraggedStorageItems(packageView); + if (handledByFtp) { // Not supported return ReturnResult.Failed; } - if (!source.Any()) - { - // Happens if you copy some text and then you Ctrl+V in Files - return ReturnResult.BadArgumentException; - } ReturnResult returnStatus = ReturnResult.InProgress;