| Index: runtime/bin/file_fuchsia.cc
|
| diff --git a/runtime/bin/file_fuchsia.cc b/runtime/bin/file_fuchsia.cc
|
| index 682428268ecb6203106c41041b1f1e38f24d02b2..ef42a310d944eccec4111f62ba72dc4a93705119 100644
|
| --- a/runtime/bin/file_fuchsia.cc
|
| +++ b/runtime/bin/file_fuchsia.cc
|
| @@ -196,8 +196,8 @@ File* File::Open(const char* name, FileOpenMode mode) {
|
| // Report errors for non-regular files.
|
| struct stat st;
|
| if (NO_RETRY_EXPECTED(stat(name, &st)) == 0) {
|
| - if (!S_ISREG(st.st_mode)) {
|
| - errno = (S_ISDIR(st.st_mode)) ? EISDIR : ENOENT;
|
| + if (S_ISDIR(st.st_mode)) {
|
| + errno = EISDIR;
|
| return NULL;
|
| }
|
| }
|
|
|