Downloading files with filenames that end in version number causes problems
On Firefox 58.0.1 and a fresh install of Mac OS X 10.12.6 I'm having problems with Firefox getting confused when downloading filenames with a version number (or similar) at the end of the filename. I have Firefox set to ask me where I want the downloaded files to be stored. I found this while downloading "audacity-macos-2.2.1.dmg" the audio editing application. With the Mac in default settings (no extensions are being shown in Finder), Firefox sees the ".dmg" on the extension and determines that the file is a Mac disk image. The extension does not show in the filename being downloaded (Firefox is stripping this in the presentation window and only shows "audacity-macos-2.2.1"). The format selector (at the bottom of the page showing where I want the download to be stored) is set to "*.dmg" so I would assume that Firefox is going to download "audacity-macos-2.2.1" + ".dmg". Instead Firefox panics and sees the ".1" at the end of the presented filename (I have not entered anything, or selected anything here) and says:
Do you want to use the ".1" extension or use ".dmg"?
Of course I was confused and selected to use ".dmg" since that is the appropriate extension. Firefox then stripped the end of the filename to "audacity-macos-2.2" and appended ".dmg" which is incorrect (altering the downloaded filename removing ".1"). I did find a workaround by selecting "Show all filename extensions" in Finder preferences (though many people will not configure Finder this way).
When Mac OS X Finder is NOT showing all filename extensions, and Firefox is downloading a filename I would suggest not touching the extension (do not strip the extension) in the "Enter name of file to save to..." window. Show the filename EXACTLY as it is being downloaded and then, if someone alters the filename, question their desire to alter the extension in an unfamiliar way.
Όλες οι απαντήσεις (3)
What happens when you add a trailing '.' in such cases so the '.1' becomes '.1.'?
If I add a dot the name becomes "audacity-macos-2.2.1..dmg" which is again incorrect. Firefox should not alter the filename if I do not touch the "Save As:" text box with the extensionless filename in it. It should simply append the extension shown in the "Format:" selection box and save the file. Remember the file inbound is "audacity-macos-2.2.1.dmg" with its extension. Firefox has parsed and stripped the extension and presented the filename with no extension in the "Save As:" text box, and selected the "Format:" selection box with the appropriate extension "*.dmg" for the incoming file.
Oh forgot to add this: If I add the dot I don't get the detection of the extension being changed but the filename is altered.