@@ -12,7 +12,6 @@ const utils = require('../utils');
1212let iconv ;
1313
1414const YAUZL_CALLBACK = Symbol ( 'ZipUncompressStream#yauzlCallback' ) ;
15- const STRIP_NAME = Symbol ( 'ZipUncompressStream#stripName' ) ;
1615
1716// don't decodeStrings on yauzl, we should handle fileName by ourself
1817// see validateFileName on https://github.com/thejoshwolfe/yauzl/blob/51010ce4e8c7e6345efe195e1b4150518f37b393/index.js#L607
@@ -34,7 +33,6 @@ class ZipUncompressStream extends UncompressBaseStream {
3433 super ( opts ) ;
3534
3635 this . _chunks = [ ] ;
37- this . _strip = Number ( opts . strip ) || 0 ;
3836 this . _zipFileNameEncoding = opts . zipFileNameEncoding || 'utf8' ;
3937 if ( this . _zipFileNameEncoding === 'utf-8' ) {
4038 this . _zipFileNameEncoding = 'utf8' ;
@@ -108,7 +106,7 @@ class ZipUncompressStream extends UncompressBaseStream {
108106 }
109107 // directory file names end with '/' (for Linux and macOS) or '\' (for Windows)
110108 const type = / [ \\ \/ ] $ / . test ( entry . fileName ) ? 'directory' : 'file' ;
111- const name = entry . fileName = this [ STRIP_NAME ] ( entry . fileName , type ) ;
109+ const name = entry . fileName ;
112110
113111 const header = { name, type, yauzl : entry , mode } ;
114112
@@ -135,10 +133,6 @@ class ZipUncompressStream extends UncompressBaseStream {
135133 zipFile . readEntry ( ) ;
136134 }
137135 }
138-
139- [ STRIP_NAME ] ( fileName , type ) {
140- return utils . stripFileName ( this . _strip , fileName , type ) ;
141- }
142136}
143137
144138module . exports = ZipUncompressStream ;
0 commit comments