chore: generate
This commit is contained in:
@@ -113,9 +113,10 @@ export function createPathHelpers(scope: () => string) {
|
|||||||
const windows = /^[A-Za-z]:/.test(root)
|
const windows = /^[A-Za-z]:/.test(root)
|
||||||
const canonRoot = windows ? root.toLowerCase() : root
|
const canonRoot = windows ? root.toLowerCase() : root
|
||||||
const canonPath = windows ? path.toLowerCase() : path
|
const canonPath = windows ? path.toLowerCase() : path
|
||||||
if (canonPath.startsWith(canonRoot) &&
|
if (
|
||||||
(canonRoot.endsWith("/") || canonPath === canonRoot ||
|
canonPath.startsWith(canonRoot) &&
|
||||||
canonPath.startsWith(canonRoot + "/"))) {
|
(canonRoot.endsWith("/") || canonPath === canonRoot || canonPath.startsWith(canonRoot + "/"))
|
||||||
|
) {
|
||||||
// If we match canonRoot + "/", the slash will be removed below.
|
// If we match canonRoot + "/", the slash will be removed below.
|
||||||
path = path.slice(root.length)
|
path = path.slice(root.length)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user