[PTRun][Folder]Allow UNC starting with // (#32309)

This commit is contained in:
Davide Giacometti
2024-04-15 18:21:02 +02:00
committed by GitHub
parent 406c49bdba
commit 83aecff13b
2 changed files with 2 additions and 1 deletions

View File

@@ -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)]

View File

@@ -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;
}