fstream-npm icon indicating copy to clipboard operation
fstream-npm copied to clipboard

Generating malformed package under single-character directory

Open gzzhanghao opened this issue 8 years ago • 0 comments
trafficstars

When publishing npm packages under a single-character folder in root directory, fstream-npm generates malformed tarball package without the "package" directory in package.tgz.

Check out https://github.com/npm/fstream-npm/blob/master/fstream-npm.js#L355

When publishing a package under e:/t/foo, entry.path.substr(h.length + 1) evaluates to /foo and entry.path then becomes e:/foo, while it was expected to be e:/package/foo.

gzzhanghao avatar Dec 10 '16 09:12 gzzhanghao