diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2016-04-03 17:03:39 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2016-04-03 17:03:39 +0200 |
commit | 57fa40103fb866200a254efb9754b4d5d54cd7f9 (patch) | |
tree | 55e74c624177971edd06b5579d41639771aae5f9 | |
parent | 55f48726d56a22eb409df0c1a091839e92dd4525 (diff) |
Delete thumbnails when deleting files.
-rwxr-xr-x | fbin.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -140,6 +140,9 @@ class Application(object): session.delete(file) session.commit() os.unlink(file.get_path()) + thumbfile = os.path.join(settings.thumb_directory, file.hash + '.jpg') + if os.path.exists(thumbfile): + os.unlink(thumbfile) except: raise finally: |