Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: runtime/bin/file_fuchsia.cc

Issue 2856913004: [Fuchsia] Allows non-regular files to be opened. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/tests/vm/dart/hello_fuchsia_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
« no previous file with comments | « no previous file | runtime/tests/vm/dart/hello_fuchsia_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698