Skip to content

Commit

Permalink
Merge pull request #246 from mmaietta/fix/empty-nested-directories
Browse files Browse the repository at this point in the history
fix: allowing nested empty directories. Fixes #245 and #144
  • Loading branch information
VerteDinde committed Nov 3, 2022
2 parents e48b380 + edd12c4 commit a4a6071
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/filesystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class Filesystem {
const dirs = p.split(path.sep)
for (const dir of dirs) {
if (dir !== '.') {
if (!json.files[dir]) {
json.files[dir] = { files: {} }
}
json = json.files[dir]
}
}
Expand Down

0 comments on commit a4a6071

Please sign in to comment.