little debug in content delete
authorcavaliet
Tue, 28 May 2013 18:18:57 +0200
changeset 1199 b4559d14b9ac
parent 1198 62eee5e70b6b
child 1200 d76ed98fae67
little debug in content delete
src/ldt/ldt/ldt_utils/models.py
--- a/src/ldt/ldt/ldt_utils/models.py	Tue May 28 12:38:17 2013 +0200
+++ b/src/ldt/ldt/ldt_utils/models.py	Tue May 28 18:18:57 2013 +0200
@@ -235,7 +235,7 @@
         if os.path.exists(temp):
             move(temp, iri_dir)
             os.rmdir(os.path.dirname(temp))
-        if os.path.exists(temp_thumbnail):
+        if os.path.exists(temp_thumbnail) and os.path.exists(os.path.join(temp_thumbnail, os.path.basename(thumbnail))):
             move(os.path.join(temp_thumbnail, os.path.basename(thumbnail)), os.path.dirname(thumbnail))
             os.rmdir(temp_thumbnail)