HDFS-9792: libhdfs++: EACCES not setting errno correctly. Contributed by Bob Hansen.

This commit is contained in:
Bob Hansen 2016-03-09 13:54:58 -05:00 committed by James Clampffer
parent 6a96f978eb
commit 69ee2e6a7e
1 changed files with 2 additions and 4 deletions

View File

@ -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;