fs/CheckFile: use IsAccessDenied()
This commit is contained in:
parent
b3723274f7
commit
dee6e498d9
@ -47,8 +47,7 @@ try {
|
|||||||
PathTraitsFS::CURRENT_DIRECTORY);
|
PathTraitsFS::CURRENT_DIRECTORY);
|
||||||
const FileInfo fi2(x);
|
const FileInfo fi2(x);
|
||||||
} catch (const std::system_error &e) {
|
} catch (const std::system_error &e) {
|
||||||
if (e.code().category() == std::system_category() &&
|
if (IsAccessDenied(e))
|
||||||
e.code().value() == EACCES)
|
|
||||||
FormatError(config_domain,
|
FormatError(config_domain,
|
||||||
"No permission to traverse (\"execute\") directory: %s",
|
"No permission to traverse (\"execute\") directory: %s",
|
||||||
path_utf8.c_str());
|
path_utf8.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user