Merge branch 'ignore_appledouble' of https://github.com/xxyzz/calibre

This commit is contained in:
Kovid Goyal 2023-02-04 13:48:38 +05:30
commit b5b96ae21e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -239,6 +239,9 @@ class USBMS(CLI, Device):
def update_booklist(filename, path, prefix): def update_booklist(filename, path, prefix):
changed = False changed = False
# Ignore AppleDouble files
if filename.startswith("._"):
return False
if path_to_ext(filename) in all_formats and self.is_allowed_book_file(filename, path, prefix): if path_to_ext(filename) in all_formats and self.is_allowed_book_file(filename, path, prefix):
try: try:
lpath = os.path.join(path, filename).partition(self.normalize_path(prefix))[2] lpath = os.path.join(path, filename).partition(self.normalize_path(prefix))[2]