mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
68f0b9a5fe
commit
0dcf9a9482
@ -189,6 +189,8 @@ class MTP_DEVICE(MTPDeviceBase):
|
||||
@synchronous
|
||||
def create_folder(self, parent_id, name):
|
||||
parent = self.filesystem_cache.id_map[parent_id]
|
||||
if not parent.is_folder:
|
||||
raise ValueError('%s is not a folder'%parent.full_path)
|
||||
e = parent.folder_named(name)
|
||||
if e is not None:
|
||||
return e
|
||||
|
@ -264,6 +264,8 @@ class MTP_DEVICE(MTPDeviceBase):
|
||||
@same_thread
|
||||
def create_folder(self, parent_id, name):
|
||||
parent = self.filesystem_cache.id_map[parent_id]
|
||||
if not parent.is_folder:
|
||||
raise ValueError('%s is not a folder'%parent.full_path)
|
||||
e = parent.folder_named(name)
|
||||
if e is not None:
|
||||
return e
|
||||
|
Loading…
x
Reference in New Issue
Block a user