Skip to content

Commit

Permalink
fix: allow resolving copy paths for files in project root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
picu committed Aug 5, 2024
1 parent 8416f33 commit 5e74583
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compiler/helpers/copy-path-resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function dealWith(inPath: string, up: number) {
return inPath;
}

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

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

0 comments on commit 5e74583

Please sign in to comment.