Index: base/platform_file_posix.cc |
diff --git a/base/platform_file_posix.cc b/base/platform_file_posix.cc |
index beae804c629c86a6b8fa4ef716f601552d9a114e..a8be8a4a95ec4351c824f1fece257a00af033dfc 100644 |
--- a/base/platform_file_posix.cc |
+++ b/base/platform_file_posix.cc |
@@ -81,6 +81,7 @@ PlatformFile CreatePlatformFileUnsafe(const FilePath& name, |
open_flags |= O_WRONLY; |
} else if (!(flags & PLATFORM_FILE_READ) && |
!(flags & PLATFORM_FILE_WRITE_ATTRIBUTES) && |
+ !(flags & PLATFORM_FILE_APPEND) && |
!(flags & PLATFORM_FILE_OPEN_ALWAYS)) { |
NOTREACHED(); |
} |
@@ -88,6 +89,11 @@ PlatformFile CreatePlatformFileUnsafe(const FilePath& name, |
if (flags & PLATFORM_FILE_TERMINAL_DEVICE) |
open_flags |= O_NOCTTY | O_NDELAY; |
+ if (flags & PLATFORM_FILE_APPEND && flags & PLATFORM_FILE_READ) |
+ open_flags |= O_APPEND | O_RDWR; |
+ else if (flags & PLATFORM_FILE_APPEND) |
jar (doing other things)
2013/06/04 23:31:50
nit: I guess you shouldn't change this... as it is
|
+ open_flags |= O_APPEND | O_WRONLY; |
+ |
COMPILE_ASSERT(O_RDONLY == 0, O_RDONLY_must_equal_zero); |
int mode = S_IRUSR | S_IWUSR; |