Skip to content

Commit f2b3d7e

Browse files
authoredAug 9, 2024··
Merge pull request #2681 from jaunusa/bugfix/copyPathDepth
fix: allow resolving copy paths for files in project root folder
2 parents 793f319 + 5e74583 commit f2b3d7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎lib/compiler/helpers/copy-path-resolve.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ function dealWith(inPath: string, up: number) {
1515
return inPath;
1616
}
1717

18-
if (depth(inPath) < up) {
19-
throw new Error('cant go up that far');
18+
if (depth(inPath) < up - 1) {
19+
throw new Error('Path outside of project folder is not allowed');
2020
}
2121

2222
return path.join(...path.normalize(inPath).split(path.sep).slice(up));

0 commit comments

Comments
 (0)
Please sign in to comment.