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
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 http://lxr.mozilla.org/mozilla/source/nsprpub/pr/include/prio.h#582 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?). http://lxr.mozilla.org/mozilla/search?string=PR_CREATE_FILE is a start, inspect the ones that don't already explicitly truncate or append.
http://lxr.mozilla.org/mozilla/source/xpinstall/src/nsRegisterItem.cpp#386 ought to have PR_APPEND.
As for: - ZFILE_CREATE in nsZipArchive.cpp, the Truncate is not needed as zipArchive first deletes the old file (for correct attribute settings). http://lxr.mozilla.org/mozilla/source/modules/libjar/nsZipArchive.cpp#665
Component: General → General
Product: Mozilla Application Suite → Core
QA Contact: general → general
You need to log in before you can comment on or make changes to this bug.