Open
Bug 1286601
Opened 10 years ago
Updated 3 years ago
Add portable version of ftruncate / SetEndOfFile
Categories
(NSPR :: NSPR, defect)
NSPR
NSPR
Tracking
(Not tracked)
NEW
People
(Reporter: luke, Unassigned)
Details
We currently have at least three places where, for lack of a PR_TruncateOpenFile(), we use PR_FileDesc2NativeHandle() and #ifdef to ftruncate on unix and SetEndOfFile on Windows:
https://dxr.mozilla.org/mozilla-central/source/netwerk/base/nsFileStreams.cpp#105
https://dxr.mozilla.org/mozilla-central/source/netwerk/cache/nsDiskCacheDevice.cpp#332
https://dxr.mozilla.org/mozilla-central/source/netwerk/cache2/CacheFileIOManager.cpp#1922
and I'll probably need to add a fourth, shortly. It'd be great to add this to NSPR so we could stop duplicating this.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•