Skip to content

Feature: Show shortcuts & hidden files in network folders #10872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 29, 2022
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
6 changes: 2 additions & 4 deletions src/Files.App/ViewModels/ItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1450,9 +1450,7 @@ public async Task<int> EnumerateItemsFromStandardFolderAsync(string path, Cancel
// Flag to use FindFirstFileExFromApp or StorageFolder enumeration
var isBoxFolder = App.CloudDrivesManager.Drives.FirstOrDefault(x => x.Text == "Box")?.Path?.TrimEnd('\\') is string boxFolder ?
path.StartsWith(boxFolder) : false; // Use storage folder for Box Drive (#4629)
var isNetworkFolder = App.DrivesManager.Drives.Any(x => x.Path == Path.GetPathRoot(path) && x.Type == DataModels.NavigationControlItems.DriveType.Network)
|| System.Text.RegularExpressions.Regex.IsMatch(path, @"^\\\\(?!\?)"); // Use storage folder for network drives (*FromApp methods return access denied)
bool enumFromStorageFolder = isBoxFolder || isNetworkFolder;
bool enumFromStorageFolder = isBoxFolder;

BaseStorageFolder rootFolder = null;

Expand Down Expand Up @@ -1529,7 +1527,7 @@ await DialogDisplayHelper.ShowDialogAsync(

CurrentFolder = currentFolder;
await EnumFromStorageFolderAsync(path, currentFolder, rootFolder, currentStorageFolder, cancellationToken);
return isBoxFolder || isNetworkFolder ? 2 : 1; // Workaround for #7428
return isBoxFolder ? 2 : 1; // Workaround for #7428
}
else
{
Expand Down