We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb76f56 commit ed7600bCopy full SHA for ed7600b
src/filesystem.cc
@@ -37,9 +37,10 @@ class PosixReadableFile : public ReadableFile {
37
: new std::ifstream(WPATH(filename),
38
is_binary ? std::ios::binary | std::ios::in
39
: std::ios::in)) {
40
- if (!*is_)
+ if (!*is_ || (is_->peek() && is_->fail())) {
41
status_ = util::StatusBuilder(util::StatusCode::kNotFound, GTL_LOC)
42
<< "\"" << filename.data() << "\": " << util::StrError(errno);
43
+ }
44
}
45
46
~PosixReadableFile() {
0 commit comments