File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,12 @@ function getExtensionPackageJSON(zipPath) {
1616 zip . entries ( ) . then ( entries => {
1717 for ( const entry of Object . values ( entries ) ) {
1818 let pathSplit = entry . name . split ( "/" ) ;
19- rootFolders [ pathSplit [ 0 ] ] = true ;
19+ if ( entry . isDirectory || pathSplit . length > 1 ) {
20+ // windows compression util only generates Directory entries if a directory is empty.
21+ // else it will list only files in non-empty dirs. So we check if the path if of the form
22+ // a/b[/c...json] to detect rootFolders implicitly conveyed by file paths.
23+ rootFolders [ pathSplit [ 0 ] ] = true ;
24+ }
2025 if ( entry . isFile && ( entry . name === "package.json" || entry . name . endsWith ( "/package.json" ) ) ) {
2126 packageJSONFilePaths [ entry . name ] = entry ;
2227 }
You can’t perform that action at this time.
0 commit comments