mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 20:14:13 +00:00
Extractor: Refactor and fix tar.* issue on windows
This commit is contained in:
parent
662849c0c2
commit
e62f79d9ae
@ -134,11 +134,8 @@ class Core(CorePluginBase):
|
|||||||
files = tid.get_files()
|
files = tid.get_files()
|
||||||
for f in files:
|
for f in files:
|
||||||
cmd = ''
|
cmd = ''
|
||||||
file_ext = os.path.splitext(f["path"])[1]
|
file_ext = os.path.splitext(os.path.splitext(f["path"])[0])[1] + os.path.splitext(f["path"])[1]
|
||||||
file_ext_sec = os.path.splitext(os.path.splitext(f["path"])[0])[1]
|
if file_ext in EXTRACT_COMMANDS:
|
||||||
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:
|
|
||||||
cmd = EXTRACT_COMMANDS[file_ext]
|
cmd = EXTRACT_COMMANDS[file_ext]
|
||||||
else:
|
else:
|
||||||
log.error("Can't extract unknown file type: %s", file_ext)
|
log.error("Can't extract unknown file type: %s", file_ext)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user