Closed Bug 147434 Opened 24 years ago Closed 23 years ago

a file named ~file.txt will expand to /home/userfile.txt when being attached

Categories

(SeaMonkey :: UI Design, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.5beta

People

(Reporter: danp, Assigned: Biesinger)

References

Details

Attachments

(1 file)

This is happening on an rc3 build, with an id of 2002052309 When trying to attach a file named ~file.txt I get the following error dialog (where user is the username I use to log in to my machine): Error opening /home/userfile.txt File /home/userfile.txt doesn't exist Expected Results: File named ~file.txt attached to email message Steps to reproduce 1. touch "~file.txt" 2. open message composer 3. click on attach button 4. choose /path/to/~file.txt 5. click ok 6. see above error
Keywords: oeone
This is a bug in the XP filepicker, actually. It always expands a leading "~" into the homedir. It should be checking for "~/" instead. I'll take this.
Assignee: mscott → bzbarsky
Component: Attachments → XP Apps
Priority: -- → P1
Product: MailNews → Browser
Target Milestone: --- → mozilla1.2alpha
Mental note. Typing "~" in the textfield and hitting enter should go to the home directory. At the same time, someone may name a file "~". Have to handle that somehow...
Hmm I guess there are two options: 1) dropping the support for ~ alltogether. Since there is a "home" button that would not be too terrible I guess. 2) restricting support to just a single "~" (same as home button) or something that starts with "~/" This leaves the problem that a file or directory might actually be called "~" and require some sort of escape (e.g. the backslash) for that case. Since this is not described anywhere and there is no help on it, this might still be confusing. Another problem with supporting "~" might be that it makes it harder to have the XP filepicker truly be XP. But then it is not that XP currently anyway ... 3) implementing the full tilde substitution scheme from the shell, including ~xxx to denote the home dir of user xxx and backslash ecaping.
1) Please, no. It's a lot faster than the button 2) Something like this, yes.... Maybe disallow selection of a file called "~" by typing the "~" (but allow if it's selected in the list). Or check for a file called "~" before treating it as the homedir. Either one. 3) That would be hell (especially because different shells treat it differently).
Target Milestone: mozilla1.2alpha → mozilla1.2beta
I won't get to this in the foreseeable future. If someone could take this, that would be great.
Keywords: helpwanted
Priority: P1 → --
Target Milestone: mozilla1.2beta → Future
Priority: -- → P4
Attached patch suggested patch — — Splinter Review
thoughts about this patch? should I put the new clone() into a try..catch block?
Attachment #126717 - Flags: review?(bzbarsky)
Comment on attachment 126717 [details] [diff] [review] suggested patch Looks reasonable. Test well!
Attachment #126717 - Flags: superreview?(bryner)
Attachment #126717 - Flags: review?(bzbarsky)
Attachment #126717 - Flags: review+
To the man with the patch.
Assignee: bzbarsky → cbiesinger
Priority: P4 → --
Target Milestone: Future → ---
Status: NEW → ASSIGNED
Keywords: helpwanted
Priority: -- → P2
Target Milestone: --- → mozilla1.5alpha
Target Milestone: mozilla1.5alpha → mozilla1.5beta
Attachment #126717 - Flags: superreview?(bryner) → superreview+
Checking in res/content/filepicker.js; /cvsroot/mozilla/xpfe/components/filepicker/res/content/filepicker.js,v <-- fi lepicker.js new revision: 1.83; previous revision: 1.82 done
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Core → Mozilla Application Suite
Blocks: 266629
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: