mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
Fixes issue on Windows platform that was preventing file system names containing underscores (_) from being considered valid
This commit is contained in:
1 parent
7dedec0f9b
commit
35fe931173
1 file changed
+1
-1
+1
-1
@@ -52,7 +52,7 @@ public class WindowsPathStrategy : IWindowsPathStrategy
|
|||||||
return false;
|
return false;
|
||||||
// regular expression to match valid absolute paths
|
// regular expression to match valid absolute paths
|
||||||
// this allows drive letters (e.g., C:\) and UNC paths (e.g., \\server\share)
|
// this allows drive letters (e.g., C:\) and UNC paths (e.g., \\server\share)
|
||||||
var pathPattern = @"^[a-zA-Z]:\\(?:[a-zA-Z0-9\s().-]+\\)*[a-zA-Z0-9\s().-]*\\?$";
|
var pathPattern = @"^[a-zA-Z]:\\(?:[a-zA-Z0-9\s()._-]+\\)*[a-zA-Z0-9\s()._-]*\\?$";
|
||||||
return Regex.IsMatch(path.Path, pathPattern);
|
return Regex.IsMatch(path.Path, pathPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user