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

Unified Diff: native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc

Issue 547713002: [NaCl SDK] nacl_io: Always create directory node in http filesystem root. (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
Index: native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc b/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc
index b41cefbda0ea5df37b59275e2b96e18f57538eaa..e0b5cb95482917d49f4db0c6bfc857d3af397981 100644
--- a/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc
+++ b/native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.cc
@@ -232,10 +232,8 @@ HttpFsNode::HttpFsNode(Filesystem* filesystem,
buffer_len_(0),
cache_content_(cache_content),
has_cached_size_(false) {
-}
-
-void HttpFsNode::SetMode(int mode) {
- stat_.st_mode = mode;
+ // http nodes are read-only by default
+ SetMode(S_IRALL);
}
Error HttpFsNode::GetStat_Locked(struct stat* stat) {
@@ -297,7 +295,7 @@ Error HttpFsNode::GetStat_Locked(struct stat* stat) {
stat_.st_mtime = 0;
stat_.st_ctime = 0;
- stat_.st_mode |= S_IFREG;
+ SetType(S_IFREG);
}
// Fill the stat structure if provided
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/httpfs/http_fs_node.h ('k') | native_client_sdk/src/libraries/nacl_io/node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698