Closed Bug 101254 Opened 23 years ago Closed 23 years ago

File extension is dropped if you rename a file before saving

Categories

(Core Graveyard :: File Handling, defect)

x86
Windows 98
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 57113
mozilla1.0

People

(Reporter: SkewerMZ, Assigned: law)

References

Details

Procedure: Open <http://www.mozilla.org/images/mozilla-banner.gif>. Save it to your hard disk, but change the filename to mozban. Expected: File is saved as "mozban.gif". Actual: File is saved as "mozban.". Build: 2001092308 W98
spam: over to File Handling. i have not changed the assigned developer [or the other fields for that matter], so if anyone realizes that a bug should have a more appropriate owner, go ahead and change it. :)
Component: XP Apps: GUI Features → File Handling
Isn't this a sorta-dupe of Bugs 55025 and 57113?
Keywords: nsbeta1, ui
--> default owner
Assignee: blakeross → law
this works for me using 10.31 and 11.01. is this still a problem for you?
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
sairuh: If you follow the test procedure correctly, this still happens with today's build.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I hate that lousy REOPENED state.
Status: REOPENED → NEW
you're right, i read this upside-down. ;) however, i think this *might* be expected behavior --i don't know if the backend "knows" to add the .gif extension if left off. bill, mscott? i keep thinking there might've been an earlier bug --or, issue at least-- dealing with this, along the lines of "should we be nice and add the extension, or would that annoy some users who purposely want to remove the extension?" *shrug*
For the record, this bug is introduced by misuse of the Windows API, and anything done in the backend would only be a workaround. I should be able to rename the file to just "mozban." if I want to, and the way to accomplish this while fixing this bug would be to have the extension of the file being saved as the Save as Type default. If the file has no extension (or a different extension) and Save as Type is .gif, .gif will be appended to the filename before that filename is passed to the backend that handles saving. Compare the way this works in NS4 to the way it works in Mozilla (it's a 4xp).
Keywords: 4xp
There likely were/are other similar bugs. This is broken; we just need to tell the file picker that the default "type" is *.<ext> when we have an extension, and make sure the file picker uses the right flags when it opens the native file picker (which actually tacks on the extension, I think). There are still complications when there are mismatches between the url extension and the mime type (e.g., foobar.cgi returning image/gif, or foobar.jpg that comes with mime type image/gif) but I'll let other bugs deal with those.
Target Milestone: --- → mozilla0.9.8
*** Bug 101481 has been marked as a duplicate of this bug. ***
balancing bug lists
Target Milestone: mozilla0.9.8 → mozilla0.9.9
balancing bug lists
Keywords: nsbeta1+
Target Milestone: mozilla0.9.9 → mozilla1.0
*** This bug has been marked as a duplicate of 57113 ***
Status: NEW → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → DUPLICATE
mass verification of duplicate bugs: to find all bugspam pertaining to this, set your search string to "DuplicateBugsBelongInZahadum". if you think this particular bug is *not* a duplicate, please provide a compelling reason, as well as check a recent *trunk* build (on the appropriate platform[s]), before reopening.
Status: RESOLVED → VERIFIED
Depends on: 57113
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.