diff --git a/src/Files.App/Filesystem/Drives.cs b/src/Files.App/Filesystem/Drives.cs index 0a1f7ba340c2..1ed16077a5c9 100644 --- a/src/Files.App/Filesystem/Drives.cs +++ b/src/Files.App/Filesystem/Drives.cs @@ -91,7 +91,9 @@ public static async Task GetRootFromPathAsync(string devi return new StorageFolderWithPath(matchingDrive, rootPath); } } - else if (devicePath.StartsWith(@"\\", StringComparison.Ordinal)) // Network share + // Network share + else if (devicePath.StartsWith(@"\\", StringComparison.Ordinal) && + !devicePath.StartsWith(@"\\SHELL\", StringComparison.Ordinal)) { int lastSepIndex = rootPath.LastIndexOf(@"\", StringComparison.Ordinal); rootPath = lastSepIndex > 1 ? rootPath.Substring(0, lastSepIndex) : rootPath; // Remove share name diff --git a/src/Files.App/ViewModels/ItemViewModel.cs b/src/Files.App/ViewModels/ItemViewModel.cs index c346e80bfb37..30ff71e84b98 100644 --- a/src/Files.App/ViewModels/ItemViewModel.cs +++ b/src/Files.App/ViewModels/ItemViewModel.cs @@ -1478,6 +1478,7 @@ public async Task EnumerateItemsFromStandardFolderAsync(string path, Cancel bool isWslDistro = App.WSLDistroManager.TryGetDistro(path, out _); bool isNetwork = path.StartsWith(@"\\", StringComparison.Ordinal) && !path.StartsWith(@"\\?\", StringComparison.Ordinal) && + !path.StartsWith(@"\\SHELL\", StringComparison.Ordinal) && !isWslDistro; bool enumFromStorageFolder = isBoxFolder;