mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More robust against buggy FileType plugins on book import
This commit is contained in:
parent
2791ba0332
commit
54909e3a59
@ -36,7 +36,12 @@ def run_import_plugins(paths, group_id, tdir):
|
||||
for path in paths:
|
||||
if not os.access(path, os.R_OK):
|
||||
continue
|
||||
nfp = run_plugins_on_import(path)
|
||||
try:
|
||||
nfp = run_plugins_on_import(path)
|
||||
except Exception:
|
||||
nfp = None
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
if nfp and os.access(nfp, os.R_OK) and not samefile(nfp, path):
|
||||
# Ensure that the filename is preserved so that
|
||||
# reading metadata from filename is not broken
|
||||
|
Loading…
x
Reference in New Issue
Block a user