Open Bug 248971 Opened 18 years ago Updated 13 years ago



(Core :: General, defect)

Not set




(Reporter: dveditz, Unassigned)


(Keywords: helpwanted)

PR_CREATE_FILE has no effect if the file already exists, PR_TRUNCATE must be
used to remove the old contents. See bug 246687 -- fix other places where this
misconception occurs.
 - libreg vr_stubs.h
 - ZFILE_CREATE in nsZipArchive.cpp
Check for others
Product: Browser → Seamonkey
Dan, can you direct me even casually with this bug, as in what exactly am I to
look for, and is PR_TRUNCATE an appropriate "fix", or are you still planning to
get to this?
PR_TRUNCATE is absolutely the right thing to do when creating a new file, see

PR_APPEND is used in some places, too. It really should be one or the other, or
else we ought to be doing something like CreateUnique() if we don't want to blow
away what's there already (temp files in several of the mailnews spots?). is a start, inspect
the ones that don't already explicitly truncate or append.
Keywords: helpwanted
As for: - ZFILE_CREATE in nsZipArchive.cpp, the Truncate is not needed as
zipArchive first deletes the old file (for correct attribute settings).
Product: Mozilla Application Suite → Core
QA Contact: general → general
Assignee: dveditz → nobody
You need to log in before you can comment on or make changes to this bug.