Skip to content

Symlink with absolute path is packed incorrectly #366

@curtisman

Description

@curtisman

Setup

cd ~
mkdir repro
cd repo
echo hello > hello.txt
ln -s ~/repro/hello.txt world.txt
ls -l

Output:

total 4
-rw-r--r-- 1 xxxxxx xxxxxx  5 Apr 25 14:33 hello.txt
lrwxrwxrwx 1 xxxxxx xxxxxx 29 Apr 25 14:34 world.txt -> /home/xxxxxx/repro/hello.txt

Repro

asar p ~/repro ~/app.asar
asar e ~/app.asar ~/e
ls -l ~/e

Output:

total 4
-rw-r--r-- 1 xxxxxx xxxxxx  6 Apr 25 14:48 hello.txt
lrwxrwxrwx 1 xxxxxx xxxxxx 28 Apr 25 14:48 world.txt -> home/xxxxxx/repro/hello.txt

Note that the extract symlink is relative to ~/e and so point to the wrong location /home/xxxxxx/e/home/xxxxxx/repro/hello.txt instead of /home/xxxxxx/repro/hello.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions