🔧
This commit is contained in:
4
node_modules/tinyglobby/dist/index.mjs
generated
vendored
4
node_modules/tinyglobby/dist/index.mjs
generated
vendored
@@ -126,7 +126,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
||||
}
|
||||
props.depthOffset = newCommonPath.length;
|
||||
props.commonPath = newCommonPath;
|
||||
props.root = newCommonPath.length > 0 ? `${cwd}/${newCommonPath.join("/")}` : cwd;
|
||||
props.root = newCommonPath.length > 0 ? path.posix.join(cwd, ...newCommonPath) : cwd;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -165,7 +165,7 @@ function getRelativePath(path2, cwd, root) {
|
||||
return posix.relative(cwd, `${root}/${path2}`) || ".";
|
||||
}
|
||||
function processPath(path2, cwd, root, isDirectory, absolute) {
|
||||
const relativePath = absolute ? path2.slice(root.length + 1) || "." : path2;
|
||||
const relativePath = absolute ? path2.slice(root === "/" ? 1 : root.length + 1) || "." : path2;
|
||||
if (root === cwd) {
|
||||
return isDirectory && relativePath !== "." ? relativePath.slice(0, -1) : relativePath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user