From f26f9c63312cdbd68e90c18c825028fb41016b18 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 26 Jul 2008 03:51:53 +0000 Subject: [PATCH] Fix do not create torrentfiles folder unless 'copy_torrent_file' is True --- deluge/core/core.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deluge/core/core.py b/deluge/core/core.py index e5c13c488..a75a2dd7a 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -711,11 +711,11 @@ class Core( self.config_value_changed(key, value) def _on_set_torrentfiles_location(self, key, value): - # First try to create the new directory - try: - os.makedirs(value) - except Exception, e: - log.debug("Unable to make directory: %s", e) + if self.config["copy_torrent_file"]: + try: + os.makedirs(value) + except Exception, e: + log.debug("Unable to make directory: %s", e) def _on_set_state_location(self, key, value): if not os.access(value, os.F_OK):