Closed
Bug 87904
Opened 25 years ago
Closed 25 years ago
Need delete file confirmation if the files are not in Profile root
Categories
(Core Graveyard :: Profile: BackEnd, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.4
People
(Reporter: tetsuroy, Assigned: ccarlen)
Details
Attachments
(3 files)
|
17.04 KB,
application/octet-stream
|
Details | |
|
8.28 KB,
patch
|
Details | Diff | Splinter Review | |
|
12.33 KB,
image/gif
|
Details |
For some reason, registry.dat specifies
a root drive ("C:" for example) as a profile root.
Thus the profile manager starts to delete the entire 'C:' directory.
We should warn the user.
| Reporter | ||
Comment 1•25 years ago
|
||
| Assignee | ||
Comment 2•25 years ago
|
||
I think the path of the directory we're going to delete should be shown
prominently in the dialog which asks the user whether to delete files. Also, if
the directory to be deleted is not a child of the default profiles folder, maybe
we should confirm a 2nd time.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → mozilla0.9.3
| Reporter | ||
Comment 3•25 years ago
|
||
Canrad: I agree on both of your suggestions.
| Assignee | ||
Comment 4•25 years ago
|
||
| Assignee | ||
Comment 5•25 years ago
|
||
The patch makes the confirm deletion dialog say:
----------------------------
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 "%S" and cannot
be undone.
Would you like to delete the profile data files?
----------------------------
The "%S" is the exact path of the dir which will be deleted, according to the
back-end. I added a new method to nsiProfileInternal which returns the exact
path which will be deleted, taking into account deletion of the parent dir of a
salted profile.
This dialog is all done with nsIPromptService, so deleteProfile.xul/.js can die.
Blake - can you sr=? You are owning profile mgr front-end these days?
One question: how can I use smart quotes in a properties file?
| Assignee | ||
Comment 6•25 years ago
|
||
I think we should display the path of the directory which is going to be deleted
in any case, but still the question is: How did the path to the profile dir
become "C:\" I think it may have to do with incorrect i18n file handling. On
Windows & Linux, the profile dir is gotten from the registry as a unicode
string. Then, an nsILocalFile is made from that with NS_NewUnicodeLocalFile.
That should work. Is it possible that, when the profile was made, the system
locale was set to Japanese and then, at some other time, NS_NewUnicodeLocalFile
was called when the system locale was *not* set to Japanese. How would the path
string be mapped into the file system char set then? Roy, can you check this out?
| Assignee | ||
Updated•25 years ago
|
Whiteboard: need r=/sr=
| Assignee | ||
Comment 8•25 years ago
|
||
Can I get r=/sr= on this? The patch has been here a while and time is running
out on 0.9.3.
Patch looks fine.
Who is doing the profile manager UI approvals, incase we need to run wording
changes ? Blake, is that you..? Conrad, Please post a screenshot. Thanks.
Also, the core problem by roy here should never occur. But, it did happen
somehow. Conrad's theory could be right. We do need to get a reproducible case
and guard agianst that aslo. All those who don't read dialogs much are simply
going wipeout important unintentionally. If we can a case where we can make 'C:'
as root, we should probably check in the patch we have, keep the bug open and
move it to 094. Roy, we need your help here. Thanks.
For now, let's go with the patch Conrad has. It's a pretty good improvement and
such a thing was requested in the beginning days of profile manager.
r=bhuvan
| Reporter | ||
Comment 10•25 years ago
|
||
bhuvan: I am more than happy to help you.
| Assignee | ||
Comment 11•25 years ago
|
||
| Assignee | ||
Comment 12•25 years ago
|
||
The new message also adds the important point that the deletion of files can't
be undone. There was a bug a while back where the person assumed that the files
were going to be moved to the trash, not deleted forever.
Whiteboard: need r=/sr= → need sr=
Comment 13•25 years ago
|
||
Ben should see the PM ui changes, if anyone should...
Comment 15•25 years ago
|
||
Why do some of the entitities have Netscape hardcoded in them?
Also, I think it may be better to show the path in a readonly textfield, so if
it's too long the user can scroll to see all of it, and so that they can copy
it. What do you think?
| Assignee | ||
Comment 16•25 years ago
|
||
> Why do some of the entitities have Netscape hardcoded in them?
Those strings are referring to 4.x profiles. The only program which could have
created such a thing was called Netscape.
> Also, I think it may be better to show the path in a readonly textfield, so
> if it's too long the user can scroll to see all of it, and so that they can
> copy it.
If it's static text, won't it wrap to fit? Also, I'm using prompt service to do
this. One of the joys of this was being able to get rid of a whole set of files
just for this dialog. If the underlying common dialog wraps the text, it should
be fine, right?
| Assignee | ||
Comment 17•25 years ago
|
||
I created a profile with an insanely long path. commonDialogs did the right
thing. It wrapped the text (over three lines) and reflowed the dialog to fit.
Seems perfect to me. It looked a hell of a lot better than the scrolling text
box that the profile wizard used to display the same path (things were clipped
badly and I *had* to scroll in order to read it)
Comment 18•25 years ago
|
||
Granted, but
> The profile you selected was created with a previous version of Netscape.
sounds like the user is currently using Netscape (they may be using Mozilla).
Also, isn't it possible to migrate profiles from a previous version of Mozilla,
or whatever other brand may be using this?
Anyways, since that was already there, sr=blake for the code itself.
| Assignee | ||
Updated•25 years ago
|
Whiteboard: need sr=
| Assignee | ||
Comment 19•25 years ago
|
||
Fix checked in. Provided there are no complaints with this,
deleteProfile.xul/deleteProfile.js can be removed from the tree.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•