Fix #2290 : Extractor: Dotted filenames being rejected
This commit is contained in:
parent
984691f74c
commit
f107485871
|
@ -132,12 +132,14 @@ 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(os.path.splitext(f["path"])[0])[1] + os.path.splitext(f["path"])[1]
|
file_root, file_ext = os.path.splitext(f["path"])
|
||||||
if file_ext in EXTRACT_COMMANDS:
|
file_ext_sec = os.path.splitext(file_root)[1]
|
||||||
cmd = EXTRACT_COMMANDS[file_ext]
|
if file_ext_sec and file_ext_sec + file_ext in EXTRACT_COMMANDS:
|
||||||
else:
|
file_ext = file_ext_sec + file_ext
|
||||||
log.error("EXTRACTOR: Can't extract unknown file type: %s", file_ext)
|
elif file_ext not in EXTRACT_COMMANDS or file_ext_sec == '.tar':
|
||||||
|
log.warning("EXTRACTOR: Can't extract file with unknown file type: %s" % f["path"])
|
||||||
continue
|
continue
|
||||||
|
cmd = EXTRACT_COMMANDS[file_ext]
|
||||||
|
|
||||||
# Now that we have the cmd, lets run it to extract the files
|
# Now that we have the cmd, lets run it to extract the files
|
||||||
fpath = os.path.join(tid_status["save_path"], os.path.normpath(f["path"]))
|
fpath = os.path.join(tid_status["save_path"], os.path.normpath(f["path"]))
|
||||||
|
|
Loading…
Reference in New Issue