From c7c1d9b201eb440ee4205d8c98401495d83d3bc0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 1 Sep 2023 11:44:52 +0530 Subject: [PATCH] MTP driver: Ignore top level folders whose names start with a leading dot --- src/calibre/devices/mtp/driver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/devices/mtp/driver.py b/src/calibre/devices/mtp/driver.py index a92b168b49..b4547c2be9 100644 --- a/src/calibre/devices/mtp/driver.py +++ b/src/calibre/devices/mtp/driver.py @@ -100,6 +100,8 @@ class MTP_DEVICE(BASE): 'pictures', 'ringtones', 'samsung', 'sony', 'htc', 'bluetooth', 'fonts', 'system', 'games', 'lost.dir', 'video', 'whatsapp', 'image', 'com.zinio.mobile.android.reader'}: return True + if lpath[0].startswith('.'): + return True if len(lpath) > 1 and lpath[0] == 'android': # Ignore everything in Android apart from a few select folders