Skip to content

Commit f1efa0a

Browse files
Updated conditional checking for virtual disk providers
- Added constant array of virtual disk providers
1 parent 31890bc commit f1efa0a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/Files.App/Services/Storage/StorageNetworkService.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ public sealed partial class NetworkService : ObservableObject, INetworkService
1818

1919
private readonly static string guid = "::{f02c1a0d-be21-4350-88b0-7367fc96ef3c}";
2020

21+
// Virtual disk path prefixes that don't work with Windows networking APIs
22+
private readonly static string[] VirtualDiskPrefixes =
23+
[
24+
@"\\RaiDrive-",
25+
@"\\cryptomator-vault\",
26+
@"\\EgnyteDrive\"
27+
];
28+
2129

2230
private ObservableCollection<IFolder> _Computers = [];
2331
/// <inheritdoc/>
@@ -227,10 +235,9 @@ public async Task<bool> AuthenticateNetworkShare(string path)
227235

228236
}
229237

230-
// Skip authentication for RaiDrive virtual shares
231-
// RaiDrive creates virtual UNC paths that don't work with Windows networking APIs
232-
// Format is \\RaiDrive-{user}\{drive-custom-name}\
233-
if (path.StartsWith(@"\\RaiDrive-", StringComparison.OrdinalIgnoreCase))
238+
// Skip authentication for virtual disk shares
239+
// These providers create virtual disk paths that don't work with Windows networking APIs
240+
if (VirtualDiskPrefixes.Any(prefix => path.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)))
234241
{
235242
return true;
236243
}

0 commit comments

Comments
 (0)