Allow EPERM in realpath just in case.
GitOrigin-RevId: a575e0e04739e793afb9f370b05afbb9f1941c17
This commit is contained in:
parent
3b11e1818c
commit
6810845770
@ -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 << '"');
|
||||
|
Reference in New Issue
Block a user