Skip to content

Commit f5b10a8

Browse files
committed
Fix: Fixed NullReferenceException with DefaultDestinationFolderPath
1 parent f3a72e1 commit f5b10a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Files.App/Utils/Archives/DecompressHelper.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ public static async Task DecompressArchiveHereAsync(IShellPage associatedInstanc
178178
BaseStorageFile archive = await StorageHelpers.ToStorageItem<BaseStorageFile>(selectedItem.ItemPath);
179179
BaseStorageFolder currentFolder = await StorageHelpers.ToStorageItem<BaseStorageFolder>(associatedInstance.FilesystemViewModel.CurrentFolder.ItemPath);
180180

181+
if (archive is null)
182+
return;
183+
181184
if (await FilesystemTasks.Wrap(() => IsArchiveEncrypted(archive)))
182185
{
183186
DecompressArchiveDialog decompressArchiveDialog = new();
@@ -213,6 +216,9 @@ public static async Task DecompressArchiveToChildFolderAsync(IShellPage associat
213216
BaseStorageFolder currentFolder = await StorageHelpers.ToStorageItem<BaseStorageFolder>(associatedInstance.FilesystemViewModel.CurrentFolder.ItemPath);
214217
BaseStorageFolder destinationFolder = null;
215218

219+
if (archive is null)
220+
return;
221+
216222
if (await FilesystemTasks.Wrap(() => DecompressHelper.IsArchiveEncrypted(archive)))
217223
{
218224
DecompressArchiveDialog decompressArchiveDialog = new();

0 commit comments

Comments
 (0)