mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
Ignore stray files created by third party processes in the notes restore dir
This commit is contained in:
parent
136df0e6e9
commit
f76440fd0e
@ -468,7 +468,11 @@ class Notes:
|
|||||||
resources = {}
|
resources = {}
|
||||||
errors = []
|
errors = []
|
||||||
for subdir in os.listdir(make_long_path_useable(self.resources_dir)):
|
for subdir in os.listdir(make_long_path_useable(self.resources_dir)):
|
||||||
for rf in os.listdir(make_long_path_useable(os.path.join(self.resources_dir, subdir))):
|
try:
|
||||||
|
subitems = os.listdir(make_long_path_useable(os.path.join(self.resources_dir, subdir)))
|
||||||
|
except NotADirectoryError:
|
||||||
|
continue
|
||||||
|
for rf in subitems:
|
||||||
if not rf.endswith(METADATA_EXT):
|
if not rf.endswith(METADATA_EXT):
|
||||||
name_path = os.path.join(self.resources_dir, subdir, rf + METADATA_EXT)
|
name_path = os.path.join(self.resources_dir, subdir, rf + METADATA_EXT)
|
||||||
name = 'unnamed'
|
name = 'unnamed'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user