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

View File

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