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)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.5beta
People
(Reporter: danp, Assigned: Biesinger)
References
Details
Attachments
(1 file)
|
1.57 KB,
patch
|
bzbarsky
:
review+
bryner
:
superreview+
|
Details | Diff | Splinter Review |
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
Comment 1•24 years ago
|
||
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
Comment 2•24 years ago
|
||
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...
Comment 3•24 years ago
|
||
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.
Comment 4•24 years ago
|
||
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).
Updated•24 years ago
|
Target Milestone: mozilla1.2alpha → mozilla1.2beta
Comment 5•23 years ago
|
||
I won't get to this in the foreseeable future. If someone could take this, that
would be great.
Updated•23 years ago
|
Priority: -- → P4
| Assignee | ||
Comment 6•23 years ago
|
||
thoughts about this patch?
should I put the new clone() into a try..catch block?
| Assignee | ||
Updated•23 years ago
|
Attachment #126717 -
Flags: review?(bzbarsky)
Comment 7•23 years ago
|
||
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+
Comment 8•23 years ago
|
||
To the man with the patch.
Assignee: bzbarsky → cbiesinger
Priority: P4 → --
Target Milestone: Future → ---
| Assignee | ||
Updated•23 years ago
|
| Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.5alpha → mozilla1.5beta
Updated•23 years ago
|
Attachment #126717 -
Flags: superreview?(bryner) → superreview+
| Assignee | ||
Comment 9•23 years ago
|
||
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
Updated•21 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•