diff options
author | Max Kellermann <max@duempel.org> | 2014-10-02 20:16:05 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-10-02 20:16:05 +0200 |
commit | 2f02e49b9f353d8c0e75711308f88e98e1a6a97c (patch) | |
tree | 36bfa7f9f984b202976e488f151d70fdf7e1b602 /src/input/plugins | |
parent | 064e8a7c6803c9607e9336ea8756e65a0bb24289 (diff) | |
download | mpd-2f02e49b9f353d8c0e75711308f88e98e1a6a97c.tar.gz mpd-2f02e49b9f353d8c0e75711308f88e98e1a6a97c.tar.xz mpd-2f02e49b9f353d8c0e75711308f88e98e1a6a97c.zip |
input/file: generate Error when errno==ENOENT
This special case was useless. Fixes the dreaded "Unrecognized URI"
error message when a file does not exist.
Diffstat (limited to 'src/input/plugins')
-rw-r--r-- | src/input/plugins/FileInputPlugin.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input/plugins/FileInputPlugin.cxx b/src/input/plugins/FileInputPlugin.cxx index a4c809915..e12439cd3 100644 --- a/src/input/plugins/FileInputPlugin.cxx +++ b/src/input/plugins/FileInputPlugin.cxx @@ -70,7 +70,7 @@ input_file_open(const char *filename, const int fd = open_cloexec(filename, O_RDONLY|O_BINARY, 0); if (fd < 0) { - if (errno != ENOENT && errno != ENOTDIR) + if (errno != ENOTDIR) error.FormatErrno("Failed to open \"%s\"", filename); return nullptr; |