From dee6e498d94752adc24a57737abc8ae90148fc9d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Dec 2016 19:56:19 +0100 Subject: [PATCH] fs/CheckFile: use IsAccessDenied() --- src/fs/CheckFile.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fs/CheckFile.cxx b/src/fs/CheckFile.cxx index 2bb635b56..2e0d7ad15 100644 --- a/src/fs/CheckFile.cxx +++ b/src/fs/CheckFile.cxx @@ -47,8 +47,7 @@ try { PathTraitsFS::CURRENT_DIRECTORY); const FileInfo fi2(x); } catch (const std::system_error &e) { - if (e.code().category() == std::system_category() && - e.code().value() == EACCES) + if (IsAccessDenied(e)) FormatError(config_domain, "No permission to traverse (\"execute\") directory: %s", path_utf8.c_str());