mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-31 14:35:18 +00:00
[PTRun][Folder]Allow UNC starting with // (#32309)
This commit is contained in:
committed by
GitHub
parent
406c49bdba
commit
83aecff13b
@@ -19,6 +19,7 @@ namespace Microsoft.Plugin.Folder.UnitTests
|
||||
|
||||
[DataTestMethod]
|
||||
[DataRow(@"\\test-server\testdir", true)]
|
||||
[DataRow(@"//test-server/testdir", true)]
|
||||
[DataRow(@"c:", true)]
|
||||
[DataRow(@"c:\", true)]
|
||||
[DataRow(@"C:\", true)]
|
||||
|
@@ -35,7 +35,7 @@ namespace Microsoft.Plugin.Folder.Sources
|
||||
ArgumentNullException.ThrowIfNull(search);
|
||||
|
||||
// Using Ordinal this is internal and we're comparing symbols
|
||||
if (search.StartsWith(@"\\", StringComparison.Ordinal))
|
||||
if (search.StartsWith(@"\\", StringComparison.Ordinal) || search.StartsWith(@"//", StringComparison.Ordinal))
|
||||
{ // share folder
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user