mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Nicer error message when creation of parent folder fails
This commit is contained in:
parent
c81d33c11c
commit
7a59b2010d
@ -406,7 +406,10 @@ class MTP_DEVICE(MTPDeviceBase):
|
||||
e = parent.folder_named(name)
|
||||
if e is not None:
|
||||
return e
|
||||
try:
|
||||
ans = self.dev.create_folder(parent.object_id, name)
|
||||
except Exception as err:
|
||||
raise OSError(f'Failed to create the folder: {name} in {parent.full_path} with error: {err}') from err
|
||||
ans['storage_id'] = parent.storage_id
|
||||
return parent.add_child(ans)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user