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(
499
499
500
500
public async Task HandleItemNavigationAsync ( string path )
501
501
{
502
- if ( ContentPageContext . ShellPage is null || PathComponents . LastOrDefault ( ) ? . Path is not { } currentPath )
502
+ if ( ContentPageContext . ShellPage is null )
503
503
return ;
504
504
505
+ var currentPath = PathComponents . LastOrDefault ( ) ? . Path ;
505
506
var isFtp = FtpHelpers . IsFtpPath ( path ) ;
506
507
var normalizedInput = NormalizePathInput ( path , isFtp ) ;
507
- if ( currentPath . Equals ( normalizedInput , StringComparison . OrdinalIgnoreCase ) ||
508
+ if ( currentPath is not null && currentPath . Equals ( normalizedInput , StringComparison . OrdinalIgnoreCase ) ||
508
509
string . IsNullOrWhiteSpace ( normalizedInput ) )
509
510
return ;
510
511
@@ -533,7 +534,7 @@ public async Task HandleItemNavigationAsync(string path)
533
534
else
534
535
{
535
536
normalizedInput = StorageFileExtensions . GetResolvedPath ( normalizedInput , isFtp ) ;
536
- if ( currentPath . Equals ( normalizedInput , StringComparison . OrdinalIgnoreCase ) )
537
+ if ( currentPath is not null && currentPath . Equals ( normalizedInput , StringComparison . OrdinalIgnoreCase ) )
537
538
return ;
538
539
539
540
var item = await FilesystemTasks . Wrap ( ( ) => DriveHelpers . GetRootFromPathAsync ( normalizedInput ) ) ;
You can’t perform that action at this time.
0 commit comments