Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,13 @@ await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(

public async Task HandleItemNavigationAsync(string path)
{
if (ContentPageContext.ShellPage is null || PathComponents.LastOrDefault()?.Path is not { } currentPath)
if (ContentPageContext.ShellPage is null)
return;

var currentPath = PathComponents.LastOrDefault()?.Path;
var isFtp = FtpHelpers.IsFtpPath(path);
var normalizedInput = NormalizePathInput(path, isFtp);
if (currentPath.Equals(normalizedInput, StringComparison.OrdinalIgnoreCase) ||
if (currentPath is not null && currentPath.Equals(normalizedInput, StringComparison.OrdinalIgnoreCase) ||
string.IsNullOrWhiteSpace(normalizedInput))
return;

Expand Down Expand Up @@ -534,7 +535,7 @@ public async Task HandleItemNavigationAsync(string path)
else
{
normalizedInput = StorageFileExtensions.GetResolvedPath(normalizedInput, isFtp);
if (currentPath.Equals(normalizedInput, StringComparison.OrdinalIgnoreCase))
if (currentPath is not null && currentPath.Equals(normalizedInput, StringComparison.OrdinalIgnoreCase))
return;

var item = await FilesystemTasks.Wrap(() => DriveHelpers.GetRootFromPathAsync(normalizedInput));
Expand Down
Loading