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.
This commit is contained in:
Max Kellermann 2014-10-02 20:16:05 +02:00
parent 064e8a7c68
commit 2f02e49b9f

View File

@ -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;