We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d18cd5 commit a3403f3Copy full SHA for a3403f3
1 file changed
src/utils/zipUtils.js
@@ -16,7 +16,12 @@ function getExtensionPackageJSON(zipPath) {
16
zip.entries().then(entries=>{
17
for (const entry of Object.values(entries)) {
18
let pathSplit = entry.name.split("/");
19
- rootFolders[pathSplit[0]] = true;
+ 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
+ }
25
if(entry.isFile && (entry.name === "package.json" || entry.name.endsWith("/package.json"))) {
26
packageJSONFilePaths[entry.name] = entry;
27
}
0 commit comments