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

Unified Diff: native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs_node.cc

Issue 587933003: [NaCl SDK] nacl_io: Fix html5fs stat on directories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs_node.cc b/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs_node.cc
index 981f69e8f3655d66f49b8bc879048cdeb8430bbc..2f7607d0ff8c06fe9b8d500800c9af5662868b19 100644
--- a/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs_node.cc
+++ b/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs_node.cc
@@ -268,13 +268,17 @@ Error Html5FsNode::Init(int open_flags) {
return EIO;
}
+ // Set all files and directories to RWX.
+ SetMode(S_IWALL | S_IRALL | S_IXALL);
+
// First query the FileRef to see if it is a file or directory.
PP_FileInfo file_info;
int32_t query_result = file_ref_iface_->Query(
fileref_resource_, &file_info, PP_BlockUntilComplete());
// If this is a directory, do not get a FileIO.
- if (query_result == PP_OK && file_info.type == PP_FILETYPE_DIRECTORY)
+ if (query_result == PP_OK && file_info.type == PP_FILETYPE_DIRECTORY) {
return 0;
+ }
fileio_resource_ =
file_io_iface_->Create(filesystem_->ppapi()->GetInstance());
« no previous file with comments | « no previous file | native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698