asar icon indicating copy to clipboard operation
asar copied to clipboard

Question: Is there a reason for unpack using absolute path while unpackDir uses glob relative to <dir>?

Open dragantl opened this issue 7 years ago • 0 comments

Command unpackDir uses the following code to determine whether the directory should be unpacked:

shouldUnpack = options.unpackDir ? isUnpackDir(path.relative(src, filename), options.unpackDir) : false;

The above basically uses a directory path relative to the <src> directory specified within asar.createPackageWithOptions(<src>, <dst>, {options});

However, unpack uses the following code, which results in absolute paths:

shouldUnpack = minimatch(filename, options.unpack, {
    matchBase: true
});

Is there a reason for unpack using absolute path?

dragantl avatar Oct 13 '16 11:10 dragantl