From 298b85c368d1a409562bc01c33d841303c273ae7 Mon Sep 17 00:00:00 2001 From: John Garland Date: Wed, 23 Mar 2011 23:38:41 +1100 Subject: [PATCH 1/2] Improve autoadd filename matching (fixes #1614) --- deluge/core/autoadd.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deluge/core/autoadd.py b/deluge/core/autoadd.py index 911b560ce..acab22097 100644 --- a/deluge/core/autoadd.py +++ b/deluge/core/autoadd.py @@ -76,12 +76,12 @@ class AutoAdd(component.Component): return for filename in os.listdir(self.config["autoadd_location"]): - if filename.split(".")[-1] == "torrent": - try: - filepath = os.path.join(self.config["autoadd_location"], filename) - except UnicodeDecodeError, e: - log.error("Unable to auto add torrent due to inproper filename encoding: %s", e) - continue + try: + filepath = os.path.join(self.config["autoadd_location"], filename) + except UnicodeDecodeError, e: + log.error("Unable to auto add torrent due to improper filename encoding: %s", e) + continue + if os.path.isfile(filepath) and filename.endswith(".torrent"): try: filedump = self.load_torrent(filepath) except (RuntimeError, Exception), e: From 45ccd3b84afff8df3b787b0d0cf31c5af75c8c34 Mon Sep 17 00:00:00 2001 From: John Garland Date: Wed, 23 Mar 2011 23:41:44 +1100 Subject: [PATCH 2/2] Fix libtorrent not compiling with boost libs 1.46 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 6f9c60aac..2a41bfbce 100644 --- a/setup.py +++ b/setup.py @@ -67,6 +67,7 @@ _extra_compile_args = [ "-D_FILE_OFFSET_BITS=64", "-DNDEBUG", "-DTORRENT_USE_OPENSSL=1", + "-DBOOST_FILESYSTEM_VERSION=2", "-O2", ]