From e62f79d9aee71acc22aaa37772267e718d5b8cc5 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 23 Feb 2013 01:55:05 +0000 Subject: [PATCH] Extractor: Refactor and fix tar.* issue on windows --- deluge/plugins/Extractor/deluge/plugins/extractor/core.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/core.py b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py index 45b9f33ca..f8ccb0b5d 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/core.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py @@ -134,11 +134,8 @@ class Core(CorePluginBase): files = tid.get_files() for f in files: cmd = '' - file_ext = os.path.splitext(f["path"])[1] - file_ext_sec = os.path.splitext(os.path.splitext(f["path"])[0])[1] - if file_ext in (".gz", ".bz2", ".lzma", ".xz") and file_ext_sec == ".tar": - cmd = EXTRACT_COMMANDS[".tar" + file_ext] - elif file_ext in EXTRACT_COMMANDS: + file_ext = os.path.splitext(os.path.splitext(f["path"])[0])[1] + os.path.splitext(f["path"])[1] + if file_ext in EXTRACT_COMMANDS: cmd = EXTRACT_COMMANDS[file_ext] else: log.error("Can't extract unknown file type: %s", file_ext)