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";
|
||||
break;
|
||||
case Status::Code::kPermissionDenied:
|
||||
if (!stat.ToString().empty())
|
||||
ReportError(EACCES, stat.ToString().c_str());
|
||||
else
|
||||
ReportError(EACCES, "Permission denied");
|
||||
errnum = EACCES;
|
||||
default_message = "Permission denied";
|
||||
break;
|
||||
default:
|
||||
errnum = ENOSYS;
|
||||
|
|
Loading…
Reference in New Issue