From 8067fe27191f1726e9f5a7eb705d3973a69bf38e Mon Sep 17 00:00:00 2001 From: mkaay Date: Wed, 18 Aug 2010 22:19:07 +0200 Subject: fixes, missing file --- module/FileDatabase.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'module/FileDatabase.py') diff --git a/module/FileDatabase.py b/module/FileDatabase.py index a71336e07..cbb72b416 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -189,6 +189,7 @@ class FileHandler: """deletes links""" f = self.getFile(id) + pid = f.packageid if not f: return None @@ -205,6 +206,10 @@ class FileHandler: self.db.deleteLink(f) self.core.pullManager.addEvent(e) + + p = self.getPackage(pid) + if len(p.getChildren()) == 0: + p.delete() #---------------------------------------------------------------------- def releaseLink(self, id): -- cgit v1.2.3