summaryrefslogtreecommitdiffstats
path: root/deluge/core/torrent.py
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/core/torrent.py')
-rw-r--r--deluge/core/torrent.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py
index be91b9da5..1676ff6ca 100644
--- a/deluge/core/torrent.py
+++ b/deluge/core/torrent.py
@@ -266,6 +266,9 @@ class Torrent(object):
self.is_finished = False
self.filename = filename
+ if not self.filename:
+ self.filename = ''
+
self.forced_error = None
self.statusmsg = None
self.state = None
@@ -1316,7 +1319,7 @@ class Torrent(object):
torrent_files = [
os.path.join(get_config_dir(), 'state', self.torrent_id + '.torrent')
]
- if delete_copies:
+ if delete_copies and self.filename:
torrent_files.append(
os.path.join(self.config['torrentfiles_location'], self.filename)
)