@@ -128,11 +128,11 @@ public static async Task DecompressArchiveAsync(IShellPage associatedInstance)
128128 if ( associatedInstance == null )
129129 return ;
130130
131- BaseStorageFile archive = await StorageHelpers . ToStorageItem < BaseStorageFile > ( associatedInstance . SlimContentPage . SelectedItems . Count != 0
132- ? associatedInstance . SlimContentPage . SelectedItem . ItemPath
133- : associatedInstance . FilesystemViewModel . WorkingDirectory ) ;
131+ BaseStorageFile archive = await StorageHelpers . ToStorageItem < BaseStorageFile > ( associatedInstance . SlimContentPage ? . SelectedItems ? . Count is null or 0
132+ ? associatedInstance . FilesystemViewModel . WorkingDirectory
133+ : associatedInstance . SlimContentPage . SelectedItem . ItemPath ) ;
134134
135- if ( archive is null )
135+ if ( archive ? . Path is null )
136136 return ;
137137
138138 var isArchiveEncrypted = await FilesystemTasks . Wrap ( ( ) => DecompressHelper . IsArchiveEncrypted ( archive ) ) ;
@@ -177,7 +177,7 @@ public static async Task DecompressArchiveAsync(IShellPage associatedInstance)
177177
178178 public static async Task DecompressArchiveHereAsync ( IShellPage associatedInstance )
179179 {
180- if ( associatedInstance ? . SlimContentPage == null )
180+ if ( associatedInstance ? . SlimContentPage ? . SelectedItems == null )
181181 return ;
182182
183183 foreach ( var selectedItem in associatedInstance . SlimContentPage . SelectedItems )
@@ -186,7 +186,7 @@ public static async Task DecompressArchiveHereAsync(IShellPage associatedInstanc
186186 BaseStorageFile archive = await StorageHelpers . ToStorageItem < BaseStorageFile > ( selectedItem . ItemPath ) ;
187187 BaseStorageFolder currentFolder = await StorageHelpers . ToStorageItem < BaseStorageFolder > ( associatedInstance . FilesystemViewModel . CurrentFolder . ItemPath ) ;
188188
189- if ( archive is null )
189+ if ( archive ? . Path is null )
190190 return ;
191191
192192 if ( await FilesystemTasks . Wrap ( ( ) => IsArchiveEncrypted ( archive ) ) )
@@ -216,7 +216,7 @@ public static async Task DecompressArchiveHereAsync(IShellPage associatedInstanc
216216
217217 public static async Task DecompressArchiveToChildFolderAsync ( IShellPage associatedInstance )
218218 {
219- if ( associatedInstance ? . SlimContentPage == null )
219+ if ( associatedInstance ? . SlimContentPage ? . SelectedItems == null )
220220 return ;
221221
222222 foreach ( var selectedItem in associatedInstance . SlimContentPage . SelectedItems )
@@ -227,7 +227,7 @@ public static async Task DecompressArchiveToChildFolderAsync(IShellPage associat
227227 BaseStorageFolder currentFolder = await StorageHelpers . ToStorageItem < BaseStorageFolder > ( associatedInstance . FilesystemViewModel . CurrentFolder . ItemPath ) ;
228228 BaseStorageFolder destinationFolder = null ;
229229
230- if ( archive is null )
230+ if ( archive ? . Path is null )
231231 return ;
232232
233233 if ( await FilesystemTasks . Wrap ( ( ) => DecompressHelper . IsArchiveEncrypted ( archive ) ) )
0 commit comments