fix(helpers): correct regex of function escapePath (#2254)

This commit is contained in:
AshGrey : りす 🐿️ 2025-12-20 03:37:53 +08:00 committed by GitHub
parent bacd19c4ea
commit 9c042dd717
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,8 +7,8 @@ import fs from "fs"
export function escapePath(fp) {
return fp
.replace(/\\ /g, " ") // unescape spaces
.replace(/^".*"$/, "$1")
.replace(/^'.*"$/, "$1")
.replace(/^"(.*)"$/, "$1")
.replace(/^'(.*)'$/, "$1")
.trim()
}