HDFS-9792: libhdfs++: EACCES not setting errno correctly. Contributed by Bob Hansen.
This commit is contained in:
parent
6a96f978eb
commit
69ee2e6a7e
@ -134,10 +134,8 @@ static int Error(const Status &stat) {
|
|||||||
default_message = "Operation canceled";
|
default_message = "Operation canceled";
|
||||||
break;
|
break;
|
||||||
case Status::Code::kPermissionDenied:
|
case Status::Code::kPermissionDenied:
|
||||||
if (!stat.ToString().empty())
|
errnum = EACCES;
|
||||||
ReportError(EACCES, stat.ToString().c_str());
|
default_message = "Permission denied";
|
||||||
else
|
|
||||||
ReportError(EACCES, "Permission denied");
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
errnum = ENOSYS;
|
errnum = ENOSYS;
|
||||||
|
Loading…
Reference in New Issue
Block a user