修复(UNC)网络路径被识别成相对路径的问题。

This commit is contained in:
unknown
2024-07-05 22:23:10 +08:00
parent 8c17275169
commit f0eeea8483
2 changed files with 19 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ function convert<F, T>(from: F): T {
* @returns
*/
function isAbsolutePath(path: string) {
const regex = /^[a-zA-Z]:\\/;
const regex = /^[a-zA-Z]:\\|^\\\\/;
return regex.test(path);
}