Skip to content

Commit 31890bc

Browse files
Added conditional checking for RaiDrive drive path
- RaiDrive seems to use a custom UNC path with the format of \\RaiDrive-{user}\{drive-custom-name}
1 parent 53466f5 commit 31890bc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,14 @@ public async Task<bool> AuthenticateNetworkShare(string path)
227227

228228
}
229229

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))
234+
{
235+
return true;
236+
}
237+
230238
fixed (char* lpcPath = path)
231239
netRes.lpRemoteName = new PWSTR(lpcPath);
232240
}

0 commit comments

Comments
 (0)