Closed Bug 238089 Opened 22 years ago Closed 21 years ago

Download of same filename's -1/-2/etc. should be appended right before last segment

Categories

(Toolkit :: Downloads API, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bugzilla, Assigned: bugs)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040320 Firefox/0.8.0+ (scragz) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040320 Firefox/0.8.0+ (scragz) When I re-download a file whose name is comprised of more than 2 segments, separated by a dot, Firefox will add the -1 extension after the first part; e.g. downloading "blah.test.file.txt" twice will save as "blah-1.test.file.txt", while "blah.test.file-1.txt" would make more sense to me. Reproducible: Always Steps to Reproduce: Sorry if the bug exists, I had no idea what to search for.
Some files have multiple extensions. Examples: firefox-i686-pc-linux-gnu.tar.gz and Firefox-mac.dmg.gz. For those, it makes sense to put the number before the first dot (rather than the last dot).
*** This bug has been marked as a duplicate of 231048 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Not a dup of bug 231048. Bug 231048 is about changing numbers in the actual filename. This is about adding numbers to the "wrong" section when numbers have to be added.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Indeed. About the multiple extensions: ideally, there would be an intelligent detection mechanism. How many "multiple" extensions do you know besides .tar.gz?
Further examples would be .en.html, .c.o ... I work on the basis that any number of extensions in in any order should be allowed in a filename. Since I would be surprised if any (artifical) intelligence would handle that open ended question, it would seem sense to either use always the first dot, always the last dot, or tag '-nnn' at the very end. My first choice would be the last of those, then to use the last dot: which makes it easiest to see that the agent has changed the name. If the best opinion is to use the first dot, that's fine. IMHO this is a metadata question & I feel that the file name should be entirely under control of the user. Ben
don't ask that question .tar.bz2 .dmg.gz ...
Okay, I hadn't thought of those examples, sorry. But perhaps there should at least be an about:config option for this. I myself am no big fan of appending it all the way at the end, since that will break file associations. But I would still prefer it before the last part instead of the way it is now, because it's more common that way, or at least for the stuff I download. Hence the about:config option...
a better heuristic/convention is certainly possible, but this isn't the answer. There's no way to do this in a sane and future-proof way, since short of trying to hardcode certain strings there isn't a way to determine if a given ending should be one or two segments or even more, and that basically fails if there's another filetype we don't handle well. the current behaviour is less potentially destructive than this, however bug 231048 and probably some other cases should be corrected. marking WONTFIX, if a better heuristic/naming convention for copies exists, file a new bug.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago21 years ago
Resolution: --- → FIXED
a better heuristic/convention is certainly possible, but this isn't the answer. There's no way to do this in a sane and future-proof way, since short of trying to hardcode certain strings there isn't a way to determine if a given ending should be one or two segments or even more, and that basically fails if there's another filetype we don't handle well. the current behaviour is less potentially destructive than this, however bug 231048 and probably some other cases should be corrected. marking WONTFIX, if a better heuristic/naming convention for copies exists, file a new bug.
Resolution: FIXED → WONTFIX
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.