Skip to content

Commit

Permalink
fix: check relative path in asarUtil without path separator (#8603)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaietta authored Oct 16, 2024
1 parent 215fc36 commit 712a8bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-chairs-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix: checking relative path without separator as that doesn't work on Windows
2 changes: 1 addition & 1 deletion packages/app-builder-lib/src/asar/asarUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class AsarPackager {

const realPathRelative = path.relative(this.config.appDir, realPathFile)
const symlinkTarget = path.resolve(this.rootForAppFilesWithoutAsar, realPathRelative)
const isOutsidePackage = realPathRelative.startsWith("../")
const isOutsidePackage = realPathRelative.startsWith("..")
if (isOutsidePackage) {
log.error({ source: log.filePath(source), realPathFile: log.filePath(realPathFile) }, `unable to copy, file is symlinked outside the package`)
throw new Error(
Expand Down

0 comments on commit 712a8bc

Please sign in to comment.