mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MTP driver: Ignore AppleDouble files
These are present on devices that go from USBMS to MTP via firmware update and have been connected to a Crapple computer when in USBMS mode.
This commit is contained in:
parent
1680139cb5
commit
02073c2618
@ -66,8 +66,9 @@ class FileOrFolder:
|
|||||||
if self.storage_id == self.object_id:
|
if self.storage_id == self.object_id:
|
||||||
self.storage_prefix = 'mtp:::%s:::'%self.persistent_id
|
self.storage_prefix = 'mtp:::%s:::'%self.persistent_id
|
||||||
|
|
||||||
|
# Ignore non ebook files and AppleDouble files
|
||||||
self.is_ebook = (not self.is_folder and
|
self.is_ebook = (not self.is_folder and
|
||||||
self.name.rpartition('.')[-1].lower() in bexts)
|
self.name.rpartition('.')[-1].lower() in bexts and not self.name.startswith('._'))
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
name = 'Folder' if self.is_folder else 'File'
|
name = 'Folder' if self.is_folder else 'File'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user