mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-30 01:25:36 +01:00
Added explanatory message for permission denied errors.
This commit is contained in:
parent
2379b516c5
commit
487764bcc9
1 changed files with 2 additions and 1 deletions
|
|
@ -436,7 +436,8 @@ def path_properties(self, path, end_session=True):
|
|||
if res.is_unmounted:
|
||||
raise PathError(path + " is not mounted")
|
||||
if res.permission_denied:
|
||||
raise PathError('Permission denied for: ' + path)
|
||||
raise PathError('Permission denied for: ' + path + '\nYou can only '+\
|
||||
'operate on paths starting with /Data, a:/ or b:/')
|
||||
if res.code not in (0, PathResponseCodes.IS_FILE):
|
||||
raise PathError(path + " has an unknown error. Code: " + \
|
||||
hex(res.code))
|
||||
|
|
|
|||
Loading…
Reference in a new issue