MTP driver: Ignore top level folders whose names start with a leading dot

This commit is contained in:
Kovid Goyal 2023-09-01 11:44:52 +05:30
parent 9cd903d954
commit c7c1d9b201
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -100,6 +100,8 @@ class MTP_DEVICE(BASE):
'pictures', 'ringtones', 'samsung', 'sony', 'htc', 'bluetooth', 'fonts', 'system', 'pictures', 'ringtones', 'samsung', 'sony', 'htc', 'bluetooth', 'fonts', 'system',
'games', 'lost.dir', 'video', 'whatsapp', 'image', 'com.zinio.mobile.android.reader'}: 'games', 'lost.dir', 'video', 'whatsapp', 'image', 'com.zinio.mobile.android.reader'}:
return True return True
if lpath[0].startswith('.'):
return True
if len(lpath) > 1 and lpath[0] == 'android': if len(lpath) > 1 and lpath[0] == 'android':
# Ignore everything in Android apart from a few select folders # Ignore everything in Android apart from a few select folders