Closed Bug 266629 Opened 20 years ago Closed 18 years ago

Cannot upload files with ~ as first letter in file name

Categories

(Firefox :: File Handling, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Firefox 3 alpha1

People

(Reporter: askwar, Assigned: Gavin)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041007 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041007 Firefox/0.10.1

On some webpage, I tried to upload a file called "~Firefox_Port_23.png" (without
the "). See the screenshot at
http://alexander.skwar.name/details.php?image_id=881 for this.
After I clicked on Ok in the file selector dialog, I'm getting an error message
that you can see in the screenshot at
http://alexander.skwar.name/details.php?image_id=882. The error message says:

File /u/vz6tmlFirefox_Port_23.png doesn't exist


Here, vz6tml is my username and /u/vz6tml is my $HOME. The image file is located
at "/u/vz6tml/Eigene_Dateien/Bilder/Screenshots", so the complete path would be
"/u/vz6tml/Eigene_Dateien/Bilder/Screenshots/~Firefox_Port_23.png".


Reproducible: Always
Steps to Reproduce:
1. cd $HOME
2. touch \~foo
3. Go to some web page which allows to upload a file and try to select this file

Actual Results:  
Error message as seen on screenshot at
http://alexander.skwar.name/details.php?image_id=882

Expected Results:  
No error message and file gets uploaded just fine.

This bug only happens on Linux, as far as I can see - or rather, it doesn't
happen on Windows. It happens with both Firefox and Thunderbird. I assume (but
don't know), that it also happens with Seamonkey.

I think, that bug is somewhat related to bug 239192.

With Firefox, I saw that error message with: Mozilla/5.0 (X11; U; Linux i686;
rv:1.7.3) Gecko/20041007 Firefox/0.10.1. Build has been done on Gentoo Linux.

With Thunderbird, I'm seeing the error message with: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041007
Thunderbird/0.8 Mnenhy/0.6.0.104
-> firefox. fixed for seamonkey in bug 147434.
Assignee: file-handling → bugs
Product: Browser → Firefox
QA Contact: ian → bmo
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Bug still exists in Firefox 1.0.7 on Linux.

Reproduce:
1) mkdir ~/tmp
2) touch ~/tmp/~test
3) Try to upload this file somewhere - like on http://putfile.com/ or in
Bugzilla as an attachment
4 [details] [diff] [review]) Confirm this bug, please :)
The processPathEntry function in
<http://lxr.mozilla.org/seamonkey/source/toolkit/components/filepicker/content/filepicker.js>
is indeed different from the one in Seamonkey
<http://lxr.mozilla.org/mozilla/source/xpfe/components/filepicker/res/content/filepicker.js>.

Confirmed
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b5) Gecko/20051013
Firefox/1.4.1
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #5)
> The processPathEntry function in
<http://lxr.mozilla.org/seamonkey/source/toolkit/components/filepicker/content/filepicker.js>
> is indeed different from the one in Seamonkey
<http://lxr.mozilla.org/mozilla/source/xpfe/components/filepicker/res/content/filepicker.js>.

I think those files should be merged and the merged result should be used by all
callers. The code in
<http://lxr.mozilla.org/seamonkey/source/toolkit/components/filepicker/content/filepicker.js>
seems to be more current except that it doesn't include the fix for function
processPathEntry as in
<http://lxr.mozilla.org/mozilla/source/xpfe/components/filepicker/res/content/filepicker.js>.

Why multiple copies of this file? 
> Why multiple copies of this file? 

Because firefox forked all sorts of stuff back when (in Feb 2003 in the case of thisfile).

This looks like bug 147434 (which has been fixed in suite since about July 2003).

Gavin, want to merge those changes in?  ;)
Depends on: 147434
sure
Assignee: bugs → nobody
QA Contact: aebrahim-bmo-507 → file.handling
Assignee: nobody → gavin.sharp
Priority: -- → P3
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 2 beta1
Attached patch port the xpfe patch (obsolete) — Splinter Review
I didn't test this, because I don't have easy access to a linux machine at the moment.
Attachment #224288 - Flags: review?(mconnor)
Whiteboard: [patch-r?]
Priority: P3 → --
Target Milestone: Firefox 2 beta1 → ---
Merges fixes from bug 142482, bug 125324 (including random changes to contract ID variables that timeless made when landing the patch), some tweaks from bug 313331, in addition to the fix for bug 147434.
Attachment #224288 - Attachment is obsolete: true
Attachment #243205 - Flags: review?(neil)
Attachment #224288 - Flags: review?(mconnor)
Comment on attachment 243205 [details] [diff] [review]
more xpfe/toolkit syncing

I didn't test this, because I don't have easy access to a linux machine that can run Firefox at the
moment.
Attachment #243205 - Flags: review?(neil) → review+
Gavin asked me to test this on Linux. I was able to upload files that started with tildes and everything else seemed to work OK.
Whiteboard: [patch-r?] → [checkin needed]
mozilla/toolkit/components/filepicker/content/filepicker.xul 	1.10
mozilla/toolkit/components/filepicker/content/filepicker.js 	1.17
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → Firefox 3 alpha1
Blocks: 240164
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: