[CP] adds handling for EACCES error

This commit is contained in:
obdev
2024-06-17 19:36:09 +00:00
committed by ob-robot
parent f395d23393
commit c5eb9389d6

View File

@ -31,7 +31,7 @@ static void convert_io_error(const int sys_err, int &ob_error_code)
{
if (ENOENT == sys_err) {
ob_error_code = OB_BACKUP_FILE_NOT_EXIST;
} else if (EPERM == sys_err) {
} else if (EPERM == sys_err || EACCES == sys_err) {
ob_error_code = OB_BACKUP_PERMISSION_DENIED;
} else if (ENOSPC == sys_err || EDQUOT == sys_err) {
ob_error_code = OB_BACKUP_DEVICE_OUT_OF_SPACE;