Skip to content

Commit 57fe67a

Browse files
committed
fix: handle different drive letters in pathStartsWith()
1 parent 765f56b commit 57fe67a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

typescript-deno-plugin/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ function pathStartsWith(child: string, parent: string) {
421421
return false;
422422
}
423423
const relative = path.relative(parent, child);
424+
if (path.isAbsolute(relative)) {
425+
return false;
426+
}
424427
return !relative.match(PARENT_RELATIVE_REGEX);
425428
}
426429

0 commit comments

Comments
 (0)