Closed Bug 395576 Opened 18 years ago Closed 18 years ago

Downloaded files get upper case extension after move (OS2's isExecutable() causes file extensions to be uppercased)

Categories

(Core :: XPCOM, defect)

Other
OS/2
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: mozilla, Unassigned)

Details

(Keywords: verified1.8.1.8)

Attachments

(1 file)

When downloading files from some servers, the downloaded filename has an upper-cased extension after it was moved to the final destination. To reproduce: - go to http://hobbes.nmsu.edu/cgi-bin/h-viewer?sh=1&fname=/pub/os2/dev/util/mzfntcfgft_20070528.zip - click on the mzfntcfgft_20070528.zip link - the download begins - during the download one one can see two files in the destination directory, mzfntcfgft_20070528.zip and mzfntcfgft_20070528.ZIP.part - when the download has completed, the final file name is mzfntcfgft_20070528.ZIP Expected result: It should be named mzfntcfgft_20070528.zip This happens with Firefox 2.0.0.x but not with SeaMonkey 1.1.x or 2.0a1pre.
Seamonkey uses completely different download manager code. Does this work the same on trunk?
Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9a8pre) Gecko/2007090919 Minefield/3.0a8pre No, this trunk build behaves exactly the same.
This is caused by isExecutable() that is called from the validateLeafName function in nsHelperAppDlg.js. Apparently this does not happen for SeaMonkey? I have looked at that code before and didn't notice that it works on the input char string instead of copying it into an extra buffer before uppercasing it for comparison...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch use extra bufferSplinter Review
This should do it. It also removes the non-high memory WinUpper fallback because that is really not needed.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Attachment #280273 - Flags: review?(mozilla)
Interesting. Using Tabmixplus 0.3.6 with "Prevent blank tabs when downloading files" NOT checked and "Save link as..." it comes out *.zip. Clicking directly on the file name as Peter described yields *.ZIP as reported.
Phil, "Save link as..." first presents you a file picker dialog, right? Whatever you type in it should override any other guesses.
Assignee: mozilla → nobody
Status: ASSIGNED → NEW
Component: Download Manager → XPCOM
Product: Firefox → Core
QA Contact: download.manager → xpcom
Summary: Downloaded files get upper case extension after move → Downloaded files get upper case extension after move (OS2's isExecutable() causes file extensions to be uppercased)
(In reply to comment #6) > Phil, "Save link as..." first presents you a file picker dialog, right? > Whatever you type in it should override any other guesses. > I thought it would, but it doesn't. Both present me with the "file picker" dialog, with the .zip lowercase. One stays that way, the other changes. Getting PS files from arXiv.org (http://xxx.arxiv.cornell.edu/ in the US) the "file picker" presents with no extension. Adding .ps results in *.PS on disk, because effectively direct click is the only way allowed.
Attachment #280273 - Flags: review?(mozilla) → review+
Fix checked in to trunk and 1.8 branch.
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1.8
Resolution: --- → FIXED
Verified as fixed with the branch nightly Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.1.8pre) Gecko/20071003 BonEcho/2.0.0.8pre and my own build from trunk Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.9a9pre) Gecko/2007100301 Minefield/3.0a9pre I also verified that file extensions added to files when downloading from http://xxx.arxiv.cornell.edu/list/astro-ph/recent (via Save Link As... from the context menu) stay lower case.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: