Allow EPERM in realpath just in case.

GitOrigin-RevId: a575e0e04739e793afb9f370b05afbb9f1941c17
This commit is contained in:
levlam 2018-06-27 19:24:09 +03:00
parent 3b11e1818c
commit 6810845770

View File

@ -94,7 +94,7 @@ Result<string> realpath(CSlice slice, bool ignore_access_denied) {
string res;
char *err = skip_eintr_cstr([&] { return ::realpath(slice.c_str(), full_path); });
if (err != full_path) {
if (ignore_access_denied && errno == EACCES) {
if (ignore_access_denied && (errno == EACCES || errno == EPERM)) {
res = slice.str();
} else {
return OS_ERROR(PSLICE() << "Realpath failed for \"" << slice << '"');