Chromium Code Reviews| Index: base/files/file_util_posix.cc |
| diff --git a/base/files/file_util_posix.cc b/base/files/file_util_posix.cc |
| index ffa79a45f42d64c933801895c918134f3502dc77..77f93ffd531571a49f3620e02853885ec952021b 100644 |
| --- a/base/files/file_util_posix.cc |
| +++ b/base/files/file_util_posix.cc |
| @@ -674,7 +674,12 @@ int ReadFile(const FilePath& filename, char* data, int max_size) { |
| int WriteFile(const FilePath& filename, const char* data, int size) { |
| ThreadRestrictions::AssertIOAllowed(); |
| - int fd = HANDLE_EINTR(creat(filename.value().c_str(), 0640)); |
| +#if !defined(OS_ANDROID) |
|
Lei Zhang
2015/10/13 08:46:40
nit: how about being positive with if-else defines
hashimoto
2015/10/14 03:18:14
Acknowledged.
|
| + const mode_t mode = 0666; |
| +#else |
| + const mode_t mode = 0640; // Be strict on Android. crbug.com/362887 |
| +#endif |
| + int fd = HANDLE_EINTR(creat(filename.value().c_str(), mode)); |
| if (fd < 0) |
| return -1; |