Closed
Bug 576978
Opened 15 years ago
Closed 15 years ago
Filename extension is selected in Save dialog when saving non-html files or using "Download Link Target" on any type
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: fredducker, Assigned: alqahira)
References
()
Details
Attachments
(1 file)
|
2.69 KB,
patch
|
stuart.morgan+bugzilla
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; fr-fr) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16
Build Identifier: Version 2.0.3 (1.9.0.19 2010051911)
When I save a file in Camino and chose to rename it (usually an image), typing a new name for the file erases the extension (.jpg, .gif...) and therefore the file is saved as a blank document.
I have to manually add ".jpg" (assuming it's a jpg file) to save the file correctly, either when renaming it in Camino or directly into the finder.
For some reason this error is not present in other browsers such as safari.
Reproducible: Always
Steps to Reproduce:
1.Go to a website with an image file such as yahoo.com
2.control-click any image and chose "save image as"
3.type another name for the file: the extension disappears in the saved file
Actual Results:
the extension disappears in the saved file
Expected Results:
-Only the name of the file should change when typing, or the extension should be hidden from the user (therefore not modifiable at this stage)
-Another alternative would consist in disabling this dialog box and saving all files to the desktop (the preferred download location would then be chosen from preferences): it would also be faster
| Assignee | ||
Comment 1•15 years ago
|
||
This is essentially the Camino version of bug 426680. I can't remember where Stuart determined the boundary between Core and Camino is wrt to Save, but we at least have some control, because for HTML files we insert the accessory view for HTML/HTML Complete/Plain Text selection.
(We should also add the "Hide extension" checkbox, too.)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: File saved from the net becomes blank document when renamed → Filename extension is selected in Save dialog when saving non-html files or using "Download Link Target" on any type
Comment 2•15 years ago
|
||
I remember being annoyed enough by this that I changed this to the Safari-like behavior in a local build (a long time ago). Something as simple as setting the save dialog's required file type to the file's extension should work, though this popped a confirmation dialog if the user changes the extension (e.g., from 'tif' to 'tiff').
Comment 3•15 years ago
|
||
(In reply to comment #2)
Er, to clarify: Safari doesn't pop an alert, so I was obviously doing something a bit differently.
| Assignee | ||
Comment 4•15 years ago
|
||
Taking; thanks to Wevah's comment, I have this mostly working :D
Assignee: nobody → alqahira
Status: NEW → ASSIGNED
| Assignee | ||
Comment 5•15 years ago
|
||
This fixes both the Save/context menu codepath and the wacky "prompt for where to save every file" codepath for downloads, adding both the "Hide extension" checkbox and the proper selection.
The only thing that doesn't work "right" is multiple extensions, like ".tar.gz" and the old ".dmg.gz"; we select everything up to the last extension. Chrome does the same thing, and Safari selects absolutely everything when using "Download Linked File As…", so I think doing this is OK.
Attachment #456373 -
Flags: superreview?(stuart.morgan+bugzilla)
Comment 6•15 years ago
|
||
Comment on attachment 456373 [details] [diff] [review]
Fix
sr=smorgan
Attachment #456373 -
Flags: superreview?(stuart.morgan+bugzilla) → superreview+
| Assignee | ||
Comment 7•15 years ago
|
||
http://hg.mozilla.org/camino/rev/2d427e494a81 with the redundant setRequiredFileType removed and the isHTML if-block comment improved in SaveHeaderSniffer.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•