From 6810845770d16fc70d9a5bcbf60692ec99de2bef Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 27 Jun 2018 19:24:09 +0300 Subject: [PATCH] Allow EPERM in realpath just in case. GitOrigin-RevId: a575e0e04739e793afb9f370b05afbb9f1941c17 --- tdutils/td/utils/port/path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdutils/td/utils/port/path.cpp b/tdutils/td/utils/port/path.cpp index 222ed88f9..3b688ba3e 100644 --- a/tdutils/td/utils/port/path.cpp +++ b/tdutils/td/utils/port/path.cpp @@ -94,7 +94,7 @@ Result 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 << '"');