Delete torrent's files correctly now.

This commit is contained in:
Alon Zakai 2007-06-14 20:01:22 +00:00
parent 797ac38ca7
commit f631fb3116
1 changed files with 5 additions and 6 deletions

View File

@ -319,12 +319,11 @@ class Manager:
shutil.rmtree(os.path.dirname(os.path.join(temp.save_dir, filename)))
except OSError: # Perhaps it wasn't downloaded
pass
else:
# This is just a file
try:
os.remove(os.path.join(temp.save_dir, filename))
except OSError:
pass # No file just means it wasn't downloaded, we can continue
# Perhaps this is just a file, try to remove it
try:
os.remove(os.path.join(temp.save_dir, filename))
except OSError:
pass # No file just means it wasn't downloaded, we can continue
### UNNEEDED, fixed already above
# # Clean up empty dir