diff --git a/src/calibre/devices/mtp/filesystem_cache.py b/src/calibre/devices/mtp/filesystem_cache.py index b1c2828b8c..dfabef06d9 100644 --- a/src/calibre/devices/mtp/filesystem_cache.py +++ b/src/calibre/devices/mtp/filesystem_cache.py @@ -204,7 +204,7 @@ class FilesystemCache(object): except KeyError: # Parent does not exist, set the parent to be the storage # object - sid = p.storage_id + sid = item.storage_id if sid not in all_storage_ids: sid = all_storage_ids[0] item.parent_id = sid