mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01: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]
|
[DataTestMethod]
|
||||||
[DataRow(@"\\test-server\testdir", true)]
|
[DataRow(@"\\test-server\testdir", true)]
|
||||||
|
[DataRow(@"//test-server/testdir", true)]
|
||||||
[DataRow(@"c:", true)]
|
[DataRow(@"c:", true)]
|
||||||
[DataRow(@"c:\", true)]
|
[DataRow(@"c:\", true)]
|
||||||
[DataRow(@"C:\", true)]
|
[DataRow(@"C:\", true)]
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace Microsoft.Plugin.Folder.Sources
|
|||||||
ArgumentNullException.ThrowIfNull(search);
|
ArgumentNullException.ThrowIfNull(search);
|
||||||
|
|
||||||
// Using Ordinal this is internal and we're comparing symbols
|
// 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
|
{ // share folder
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user