mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Ignore files for which stat() fails when listing extra files
This commit is contained in:
parent
0b9064bcc6
commit
6a0b6f46de
@ -1915,7 +1915,10 @@ class DB:
|
||||
relpath = os.path.relpath(path, full_book_path)
|
||||
relpath = relpath.replace(os.sep, '/')
|
||||
if relpath not in known_files:
|
||||
stat_result = os.stat(path)
|
||||
try:
|
||||
stat_result = os.stat(path)
|
||||
except OSError:
|
||||
continue
|
||||
if stat.S_ISDIR(stat_result.st_mode):
|
||||
continue
|
||||
if yield_paths:
|
||||
|
Loading…
x
Reference in New Issue
Block a user