File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Files.App/Data/Models Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -93,12 +93,12 @@ public async Task<LocationItem> CreateLocationItemFromPathAsync(string path)
9393 ShowEmptyRecycleBin = string . Equals ( path , Constants . UserEnvironmentPaths . RecycleBinPath , StringComparison . OrdinalIgnoreCase )
9494 } ;
9595 locationItem . IsDefaultLocation = false ;
96- locationItem . Text = res . Result ? . DisplayName ?? Path . GetFileName ( path . TrimEnd ( '\\ ' ) ) ;
96+ locationItem . Text = res ? . Result ? . DisplayName ?? Path . GetFileName ( path . TrimEnd ( '\\ ' ) ) ;
9797
9898 if ( res )
9999 {
100100 locationItem . IsInvalid = false ;
101- if ( res && res . Result is not null )
101+ if ( res . Result is not null )
102102 {
103103 var result = await FileThumbnailHelper . GetIconAsync (
104104 res . Result . Path ,
@@ -117,7 +117,7 @@ public async Task<LocationItem> CreateLocationItemFromPathAsync(string path)
117117 {
118118 locationItem . Icon = await MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( ( ) => UIHelpers . GetSidebarIconResource ( Constants . ImageRes . Folder ) ) ;
119119 locationItem . IsInvalid = true ;
120- Debug . WriteLine ( $ "Pinned item was invalid { res . ErrorCode } , item: { path } ") ;
120+ Debug . WriteLine ( $ "Pinned item was invalid { res ? . ErrorCode } , item: { path } ") ;
121121 }
122122
123123 return locationItem ;
You can’t perform that action at this time.
0 commit comments