Delete torrent's files correctly now.
This commit is contained in:
parent
797ac38ca7
commit
f631fb3116
11
src/core.py
11
src/core.py
|
@ -319,12 +319,11 @@ class Manager:
|
||||||
shutil.rmtree(os.path.dirname(os.path.join(temp.save_dir, filename)))
|
shutil.rmtree(os.path.dirname(os.path.join(temp.save_dir, filename)))
|
||||||
except OSError: # Perhaps it wasn't downloaded
|
except OSError: # Perhaps it wasn't downloaded
|
||||||
pass
|
pass
|
||||||
else:
|
# Perhaps this is just a file, try to remove it
|
||||||
# This is just a file
|
try:
|
||||||
try:
|
os.remove(os.path.join(temp.save_dir, filename))
|
||||||
os.remove(os.path.join(temp.save_dir, filename))
|
except OSError:
|
||||||
except OSError:
|
pass # No file just means it wasn't downloaded, we can continue
|
||||||
pass # No file just means it wasn't downloaded, we can continue
|
|
||||||
|
|
||||||
### UNNEEDED, fixed already above
|
### UNNEEDED, fixed already above
|
||||||
# # Clean up empty dir
|
# # Clean up empty dir
|
||||||
|
|
Loading…
Reference in New Issue