Commit 07212f30 authored by noamsml@chromium.org's avatar noamsml@chromium.org

For PWG raster file creation, use FLAG_WRITE instead of FLAG_APPEND

FLAG_CREATE_AWLAYS doesn't make sense with FLAG_APPEND.

BUG=383997

Review URL: https://codereview.chromium.org/330083004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276878 0039d316-1c4b-4281-b951-d872f2087c98
parent f9e56701
...@@ -76,9 +76,8 @@ void FileHandlers::Init(base::RefCountedMemory* data) { ...@@ -76,9 +76,8 @@ void FileHandlers::Init(base::RefCountedMemory* data) {
// Reopen in read only mode. // Reopen in read only mode.
pdf_file_.Initialize(GetPdfPath(), pdf_file_.Initialize(GetPdfPath(),
base::File::FLAG_OPEN | base::File::FLAG_READ); base::File::FLAG_OPEN | base::File::FLAG_READ);
pwg_file_.Initialize( pwg_file_.Initialize(GetPwgPath(),
GetPwgPath(), base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_APPEND);
} }
bool FileHandlers::IsValid() { bool FileHandlers::IsValid() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment