diff --git a/src/Files.App/Services/Storage/StorageNetworkService.cs b/src/Files.App/Services/Storage/StorageNetworkService.cs index 5cea00e864a1..bcfd16519a21 100644 --- a/src/Files.App/Services/Storage/StorageNetworkService.cs +++ b/src/Files.App/Services/Storage/StorageNetworkService.cs @@ -18,6 +18,14 @@ public sealed partial class NetworkService : ObservableObject, INetworkService private readonly static string guid = "::{f02c1a0d-be21-4350-88b0-7367fc96ef3c}"; + // Virtual disk path prefixes that don't work with Windows networking APIs + private readonly static string[] VirtualDiskPrefixes = + [ + @"\\RaiDrive-", + @"\\cryptomator-vault\", + @"\\EgnyteDrive\" + ]; + private ObservableCollection _Computers = []; /// @@ -227,6 +235,13 @@ public async Task AuthenticateNetworkShare(string path) } + // Skip authentication for virtual disk shares + // These providers create virtual disk paths that don't work with Windows networking APIs + if (VirtualDiskPrefixes.Any(prefix => path.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))) + { + return true; + } + fixed (char* lpcPath = path) netRes.lpRemoteName = new PWSTR(lpcPath); }