File with no extension uses icon for C: drive
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox88 | --- | fixed |
People
(Reporter: agashlin, Assigned: tnikkel)
Details
Attachments
(2 files)
STR:
- Click a link to open a file that will be saved with no extension, example octet-stream just called "test".
- In the unknown content type dialog the icon shown will be that for the C: drive itself.
- Save the file.
- The icon shown in the downloads panel will be the same C: drive icon.
I'm pretty sure it's for the C: drive and not just some default icon, because it shows up differently on different machines, consistent with how C: appears in Explorer (e.g. with BitLocker, across Win 7 and Win 10). Even if the file is saved to an external drive with a different icon, the C: icon is used in both the dialog and the panel.
This isn't new, I found it going back at least to 2018. Sorry if it's already filed but I couldn't find a previous example.
| Reporter | ||
Comment 1•4 years ago
|
||
Also note that this is different from the behavior for an unknown extension, which shows a "blank page" icon, probably that's the one we should be using.
Comment 2•4 years ago
|
||
Believe it or not, this is moz-icon code and it lives in imagelib.
The problem is that we'll try to create an icon with moz-icon://test?size=16&contentType=application/octet-stream and either the nsIconURI.cpp or the windows implementation of nsIconChannel.cpp does not deal well with the leafname not having an extension.
| Assignee | ||
Comment 3•4 years ago
|
||
This code seems like it could not deal with not having an extension maybe
https://searchfox.org/mozilla-central/rev/8432d4fe31245ae9121231d7c0335aaa342675d2/image/decoders/icon/win/nsIconChannel.cpp#449
Updated•4 years ago
|
| Assignee | ||
Comment 4•4 years ago
|
||
The tests I added pass before and after this patch. I couldn't figure out a way to write a test that failed before.
Updated•4 years ago
|
Comment 6•4 years ago
|
||
Backed out for causing failure at reftest.list.
Backout link: https://hg.mozilla.org/integration/autoland/rev/b508157c9213b7237a7d600b8b98359fbd4067d5
Failure log: https://treeherder.mozilla.org/logviewer?job_id=331003875&repo=autoland&lineNumber=1503
| Assignee | ||
Updated•4 years ago
|
Comment 8•4 years ago
|
||
| bugherder | ||
Description
•