mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
fix shutil.copy() exception. ticket #308 - regulate
This commit is contained in:
parent
baebb214fa
commit
1f6127160c
1 changed files with 7 additions and 1 deletions
|
@ -593,7 +593,13 @@ class Manager:
|
||||||
|
|
||||||
full_new_name = os.path.join(self.base_dir, TORRENTS_SUBDIR, filename_short)
|
full_new_name = os.path.join(self.base_dir, TORRENTS_SUBDIR, filename_short)
|
||||||
|
|
||||||
|
try:
|
||||||
shutil.copy(filename, full_new_name)
|
shutil.copy(filename, full_new_name)
|
||||||
|
except Exception, e:
|
||||||
|
if str(e).find('are the same file'):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
# Create torrent object
|
# Create torrent object
|
||||||
new_torrent = torrent_info(full_new_name, save_dir, compact)
|
new_torrent = torrent_info(full_new_name, save_dir, compact)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue