summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-12-04 19:56:19 +0100
committerMax Kellermann <max@musicpd.org>2016-12-04 19:56:25 +0100
commitdee6e498d94752adc24a57737abc8ae90148fc9d (patch)
tree7d277da5271133466d1414712b2e928bae35da7e /src
parentb3723274f7624b19e0979ba4b22f8257f50da331 (diff)
fs/CheckFile: use IsAccessDenied()
Diffstat (limited to 'src')
-rw-r--r--src/fs/CheckFile.cxx3
1 files changed, 1 insertions, 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());