File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/Files.App/ViewModels/UserControls Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -499,12 +499,13 @@ await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(
499499
500500 public async Task HandleItemNavigationAsync ( string path )
501501 {
502- if ( ContentPageContext . ShellPage is null || PathComponents . LastOrDefault ( ) ? . Path is not { } currentPath )
502+ if ( ContentPageContext . ShellPage is null )
503503 return ;
504504
505+ var currentPath = PathComponents . LastOrDefault ( ) ? . Path ;
505506 var isFtp = FtpHelpers . IsFtpPath ( path ) ;
506507 var normalizedInput = NormalizePathInput ( path , isFtp ) ;
507- if ( currentPath . Equals ( normalizedInput , StringComparison . OrdinalIgnoreCase ) ||
508+ if ( currentPath is not null && currentPath . Equals ( normalizedInput , StringComparison . OrdinalIgnoreCase ) ||
508509 string . IsNullOrWhiteSpace ( normalizedInput ) )
509510 return ;
510511
@@ -533,7 +534,7 @@ public async Task HandleItemNavigationAsync(string path)
533534 else
534535 {
535536 normalizedInput = StorageFileExtensions . GetResolvedPath ( normalizedInput , isFtp ) ;
536- if ( currentPath . Equals ( normalizedInput , StringComparison . OrdinalIgnoreCase ) )
537+ if ( currentPath is not null && currentPath . Equals ( normalizedInput , StringComparison . OrdinalIgnoreCase ) )
537538 return ;
538539
539540 var item = await FilesystemTasks . Wrap ( ( ) => DriveHelpers . GetRootFromPathAsync ( normalizedInput ) ) ;
You can’t perform that action at this time.
0 commit comments