Closed Bug 273729 Opened 15 years ago Closed 4 years ago

Profile removal caused data loss by deleting files in use and not created by program.


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

Windows XP
Not set


(Not tracked)



(Reporter: jestre42-bugs, Unassigned)


(Depends on 1 open bug)


(Keywords: dataloss)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla Thunderbird/version 1.0 (20041206)

I recently installed Thunderbird and was trying to import from Outlook.
When the import failed to import messages I deleted the profile to try again.
This deleted the entire directory including 2 open locked files 'Personal.PST' '
Outlook.OST' that were in use by Outlook.
A recent installer for Mozilla suite had created a directory '../backups/user/'
and a sub directory 'user' under that so when the final destination was
'../backups/user/user' installing Thunderbird I had assumed the same operation.
However it appears to have installed the profile directly in '../Backups/' and
not added the user directory.
Upon deleting the profile I noticed that outlook would no longer display the
data from the PST file.  I then found that all my backups were deleted inluding
my firefox profile and my PST file.
This became a problem when the recent backup did not copy the PST file since it
was locked and in use by the system.
However the profile delete was more thorough and erased the files in use.

Reproducible: Always
Steps to Reproduce:
1. Create a new profile in a populated directory
2. Open and lock a pre-exisitng file in the directory
3. Remove the profile and delete it

Actual Results:  
4. The files are gone

Expected Results:  
1. The profile removal tool should only delete files it created or were added by
the program.  At the very least no foregn directories nor unrecognized files
should be deleted.  This is expected behavior and standard with most win
uninstall tools.
2. anything removed by Profile Manager should be trashed/recycled, not deleted
according to system settings. see bugs 18927 and 260496.
3. the profile creation tool should create a log of files created and added upon
installation and subsequent actions.
4. new files created or added should be logged. including sub folders,
extensions etc.
5. if the folder is not empty after Prompt before removal SOP in windows.

If this is to broad and needs to be split up into multiple bugs let me know and
I will focus this to one item and add any others.
*** Bug 273730 has been marked as a duplicate of this bug. ***
Keywords: dataloss
I'm inclined to WONTFIX this. Mozilla/Firefox "own" their profile folder, and
there shouldn't be any foreign files there in the first place.
(In reply to comment #2)
> I'm inclined to WONTFIX this. Mozilla/Firefox "own" their profile folder, and
> there shouldn't be any foreign files there in the first place.

If Mozilla/Firefox "owns" their profile folder then it must confirm this upon
The the profile creation code should verify that the directory does not exist
and create it or verify that an existing directory is empty.
Profile creation should be inhibited otherwise.
This would eliminate the posibility of erasing pre-exisitng data.
*** Bug 308523 has been marked as a duplicate of this bug. ***
Related Firefox bugs: Bug 270705 Bug 302087 Bug 304290

I created a new profile in Thunderbird 1.5 (WinXP) in a custom location with pre-existing files and it does, indeed, delete all files in the profile folder, non-mozilla files included, when you delete the profile and use the "Delete Files" option.  

A Dialog box "Delete Profile" is displayed with the warning:
"Deleting a profile will remove the profile from the list of available profiles and cannot be undone.  
You may also choose to delete the profile data files, including your saved mail, settings and certificates.  This option will delete the folder [folder path\name] and cannot be undone.  
Would you like to delete the profile data files?" 

Considering the consequences, at the very least a more prominent warning should be displayed in bold, for example, 
"Warning: "Delete Files" will remove the [folder path\name] folder and it's contents and cannot be undone.  Data loss will occur if that folder contains non-Mozilla files.  If you are unsure, select "Don't Delete Files".  If possible, the dialog box should also be changed so that "Don't Delete Files" is the default action.   
> If possible, the dialog box should also be changed so that 
> "Don't Delete Files" is the default action.   

Strike that. ("Don't Delete Files" is already the default action when using the "enter" key.)  As it is now, the user has the choice of three buttons: "Don't Delete Files", "Delete Files"  and "Cancel".  This might confuse the user since his goal is to delete a profile. There should only be two choices a user has to make, OK and Cancel.  If the user additionally wants to delete the profile folder then that should be a separate option he would need to checkmark in the dialog box. 

See the related Firefox bug 302087

Confirming on the basis of Alice Wyman's report.  Is the patch for bug 302087 applicable here?
Ever confirmed: true
Depends on: 302087
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
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.