Skip to content

Commit 92ea6b6

Browse files
authored
Return null on failed copy (#2830)
1 parent 7ed1de6 commit 92ea6b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Files/Filesystem/FilesystemOperations/FilesystemOperations.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ await DialogDisplayHelper.ShowDialogAsync(
209209
fsResult = fsCopyResult;
210210
}
211211
errorCode?.Report(fsResult.ErrorCode);
212+
if (!fsResult)
213+
{
214+
return null;
215+
}
212216
}
213217
}
214218
else if (source.ItemType == FilesystemItemType.File)
@@ -267,6 +271,10 @@ await DialogDisplayHelper.ShowDialogAsync(
267271
}
268272
}
269273
errorCode?.Report(fsResult.ErrorCode);
274+
if (!fsResult)
275+
{
276+
return null;
277+
}
270278
}
271279

272280
if (Path.GetDirectoryName(destination) == associatedInstance.FilesystemViewModel.WorkingDirectory)

0 commit comments

Comments
 (0)