Open
Bug 248971
Opened 21 years ago
Updated 7 months ago
Fix PR_CREATE_FILE w/out PR_TRUNCATE
Categories
(NSPR :: NSPR, defect)
NSPR
NSPR
Tracking
(Not tracked)
NEW
People
(Reporter: dveditz, Unassigned)
Details
(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
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 1•20 years ago
|
||
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?
Reporter | ||
Comment 2•20 years ago
|
||
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.
Keywords: helpwanted
Reporter | ||
Comment 3•20 years ago
|
||
http://lxr.mozilla.org/mozilla/source/xpinstall/src/nsRegisterItem.cpp#386 ought
to have PR_APPEND.
Comment 4•20 years ago
|
||
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
Updated•19 years ago
|
Product: Mozilla Application Suite → Core
QA Contact: general → general
Reporter | ||
Updated•15 years ago
|
Assignee: dveditz → nobody
Updated•2 years ago
|
Severity: normal → S3
Updated•7 months ago
|
Component: General → NSPR
Product: Core → NSPR
Version: Trunk → other
You need to log in
before you can comment on or make changes to this bug.
Description
•