Closed Bug 59045 Opened 24 years ago Closed 8 years ago

check if file exists before calling CopyTo() in nsProfile.cpp, RecursiveCopy()

Categories

(Core Graveyard :: Profile: BackEnd, defect, P3)

x86
All
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE
mozilla1.5beta

People

(Reporter: sspitzer, Assigned: ccarlen)

Details

in RecursiveCopy() in nsProfie.cpp we call CopyTo() to copy default files into
the users profile directory.

this doesn't stomp on existing files (for example, those migrated from 4.x)
because CopyTo() does not over-write existing files.

there is nothing in the interface to guarantee that won't change.

we should be explicitly checking for existance before calling CopyTo().
we never want to over-write the existing files.
Doing a mass reassign to Conrad Carlen.

Conrad is going address all current and upcoming profile manager issues. Please
do not hesitate to involve me in any of the issues.
Assignee: racham → ccarlen
I'll add a parameter to it which says whether to (1) overwrite existing files,
(2) error if they exist, or (3) dont overwrite and continue (what it does now).
Not that profile mgr uses the first two options, but it may at some point and at
least it would be explicit.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.8
-> mozilla 1.0
Target Milestone: mozilla0.8 → mozilla1.0
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
The nsIFile API says it "may" fail if the file exists in the dest :-/
Target Milestone: mozilla1.0.1 → mozilla1.5beta
QA Contact: agracebush → profile-manager-backend
This bug is filed in a bugzilla component related to pre-Firefox code which no longer exists. I believe it is no longer relevant and I am therefore closing it INCOMPLETE.

If you believe that this bug is still valid and needs to be fixed, please reopen it and move it to the Toolkit:Startup and Profile System product/component.
No longer blocks: 1243899
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.