Skip to content

Commit 712a8bc

Browse files
authored
fix: check relative path in asarUtil without path separator (#8603)
1 parent 215fc36 commit 712a8bc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/slimy-chairs-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix: checking relative path without separator as that doesn't work on Windows

packages/app-builder-lib/src/asar/asarUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class AsarPackager {
102102

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

0 commit comments

Comments
 (0)