From 2f02e49b9f353d8c0e75711308f88e98e1a6a97c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Oct 2014 20:16:05 +0200 Subject: 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. --- src/input/plugins/FileInputPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') 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; -- cgit v1.2.3