summaryrefslogtreecommitdiffstats
path: root/module/FileDatabase.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-08-18 22:19:07 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-08-18 22:19:07 +0200
commit8067fe27191f1726e9f5a7eb705d3973a69bf38e (patch)
treee898649b4572c3a755549215c5cdff9a22f9eb02 /module/FileDatabase.py
parentedited readme, save configs after start (diff)
downloadpyload-8067fe27191f1726e9f5a7eb705d3973a69bf38e.tar.xz
fixes, missing file
Diffstat (limited to 'module/FileDatabase.py')
-rw-r--r--module/FileDatabase.py5
1 files changed, 5 insertions, 0 deletions
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):