Index: runtime/bin/file_fuchsia.cc |
diff --git a/runtime/bin/file_fuchsia.cc b/runtime/bin/file_fuchsia.cc |
index 682428268ecb6203106c41041b1f1e38f24d02b2..928b76dc59611be59da2b1c8fd7b7e6ae41f604b 100644 |
--- a/runtime/bin/file_fuchsia.cc |
+++ b/runtime/bin/file_fuchsia.cc |
@@ -193,14 +193,6 @@ File* File::FileOpenW(const wchar_t* system_name, FileOpenMode mode) { |
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) { |
zra
2017/04/26 17:34:13
Could you explain why this is needed?
This change
|
- if (!S_ISREG(st.st_mode)) { |
- errno = (S_ISDIR(st.st_mode)) ? EISDIR : ENOENT; |
- return NULL; |
- } |
- } |
int flags = O_RDONLY; |
if ((mode & kWrite) != 0) { |
ASSERT((mode & kWriteOnly) == 0); |