fix: only count something as a directory if it has children (#4595)
* fix: only count something as a directory if it has children * fix: playwright tests * fix: return 0 if you cant find the projectfolder * fix: remove folder count from e2e tests since it is unused currently --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
This commit is contained in:
@ -307,7 +307,10 @@ const directoryCount = (file: FileEntry) => {
|
||||
let count = 0
|
||||
if (file.children) {
|
||||
for (let entry of file.children) {
|
||||
count += 1
|
||||
// We only want to count FileEntries with children, e.g. folders
|
||||
if (entry.children !== null) {
|
||||
count += 1
|
||||
}
|
||||
directoryCount(entry)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user