Check library: Dont abort if there are folders in the library that calibre does not have permission to access. Fixes #1884544 [Library check tries to read system files](https://bugs.launchpad.net/calibre/+bug/1884544)

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2020-06-22 23:40:21 +05:30
commit e73312ffb8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -108,6 +108,7 @@ class CheckLibrary(object):
# Look for titles in the author directories
found_titles = False
try:
for title_dir in os.listdir(auth_path):
if self.ignore_name(title_dir):
continue
@ -135,6 +136,10 @@ class CheckLibrary(object):
# Record the book to check its formats
self.book_dirs.append((db_path, title_dir, id_))
found_titles = True
except:
traceback.print_exc()
# Sort-of check: exception processing directory
self.failed_folders.append((auth_dir, traceback.format_exc(), []))
# Fourth check: author directories that contain no titles
if not found_titles: