asar
asar copied to clipboard
Question: Is there a reason for unpack using absolute path while unpackDir uses glob relative to <dir>?
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?