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)
93
93
ShowEmptyRecycleBin = string . Equals ( path , Constants . UserEnvironmentPaths . RecycleBinPath , StringComparison . OrdinalIgnoreCase )
94
94
} ;
95
95
locationItem . IsDefaultLocation = false ;
96
- locationItem . Text = res . Result ? . DisplayName ?? Path . GetFileName ( path . TrimEnd ( '\\ ' ) ) ;
96
+ locationItem . Text = res ? . Result ? . DisplayName ?? Path . GetFileName ( path . TrimEnd ( '\\ ' ) ) ;
97
97
98
98
if ( res )
99
99
{
100
100
locationItem . IsInvalid = false ;
101
- if ( res && res . Result is not null )
101
+ if ( res . Result is not null )
102
102
{
103
103
var result = await FileThumbnailHelper . GetIconAsync (
104
104
res . Result . Path ,
@@ -117,7 +117,7 @@ public async Task<LocationItem> CreateLocationItemFromPathAsync(string path)
117
117
{
118
118
locationItem . Icon = await MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( ( ) => UIHelpers . GetSidebarIconResource ( Constants . ImageRes . Folder ) ) ;
119
119
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 } ") ;
121
121
}
122
122
123
123
return locationItem ;
You can’t perform that action at this time.
0 commit comments