Deal better with empty directories.
This commit is contained in:
parent
87429b018c
commit
322c86e3a2
1 changed files with 3 additions and 1 deletions
|
|
@ -182,7 +182,6 @@ public class DirectoryEntry extends EntryWithChildren<Entry> {
|
|||
boolean hidden = Boolean.parseBoolean(props.getProperty("dir." + name + ".hidden"));
|
||||
if (!hidden) {
|
||||
DirectoryEntry dir = new DirectoryEntry(services, this, new File(file, name));
|
||||
children.add(dir);
|
||||
if (name != null && name.equals(coverFileName)) {
|
||||
setThumbnail(dir.getThumbnail());
|
||||
}
|
||||
|
|
@ -191,6 +190,9 @@ public class DirectoryEntry extends EntryWithChildren<Entry> {
|
|||
oldest = fileDate;
|
||||
}
|
||||
dir.setCaption(props.getProperty("dir." + name + ".caption"));
|
||||
if (!dir.getContents().isEmpty()) {
|
||||
children.add(dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue