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:
parent
064e8a7c68
commit
2f02e49b9f
@ -70,7 +70,7 @@ input_file_open(const char *filename,
|
|||||||
|
|
||||||
const int fd = open_cloexec(filename, O_RDONLY|O_BINARY, 0);
|
const int fd = open_cloexec(filename, O_RDONLY|O_BINARY, 0);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
if (errno != ENOENT && errno != ENOTDIR)
|
if (errno != ENOTDIR)
|
||||||
error.FormatErrno("Failed to open \"%s\"",
|
error.FormatErrno("Failed to open \"%s\"",
|
||||||
filename);
|
filename);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user