diff --git a/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy b/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy index c3ac2ea6..c4fce32e 100644 --- a/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy +++ b/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy @@ -96,6 +96,9 @@ class PersisterFolderService extends BasePersisterService { def hashListFile = hashListPath.toFile() if (hashListFile.isFile()) hashListFile.delete() + def parent = hashListFile.getParentFile() + if (parent.list().length == 0) + parent.delete() } void onFileLoadedEvent(FileLoadedEvent loadedEvent) {