mirror of https://github.com/zlatinb/muwire
delete empty directories from files/
parent
c79fd9b8d5
commit
4a62215e46
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue