SUMMARY: KDE Dolphin recognizes the HTML file as a Perl file, when a line of code "use strict" was written in it, but Perl file is not for the browser. https://forum.kde.org/viewtopic.php?f=223&t=164476&p=428073#p428060 Manjaro 18.1.5 / KDE 5.66.0 / Plasma 5.17.5
Can you run a command in Konsole and send the output? `file --mime-type path_to_your_file`
(In reply to Nate Graham from comment #1) > Can you run a command in Konsole and send the output? > > `file --mime-type path_to_your_file` wrong.html: text/html
Do you see the wrong icon when the file is viewed in Dolphin, or when it is on the desktop, or in both?
(In reply to Nate Graham from comment #3) > Do you see the wrong icon when the file is viewed in Dolphin, or when it is > on the desktop, or in both? I copied the wrong icon(Perl)-file and then pasted it into Dolphin. It seems right HTML Icon. If I open it with whatever editor and then save it in Dolphin, the HTML-icon will automatically switch to the wrong (Perl-)Icon.
(In reply to Nate Graham from comment #3) > Do you see the wrong icon when the file is viewed in Dolphin, or when it is > on the desktop, or in both? in both
Created attachment 125750 [details] Test case file Bizarre. Can confirm. It seems like some code somewhere is unconditionally checking for "use strict" to determine which icon to show.
(In reply to Nate Graham from comment #6) > Created attachment 125750 [details] > Test case file > > Bizarre. Can confirm. > > It seems like some code somewhere is unconditionally checking for "use > strict" to determine which icon to show. Other code line "use warnings" too.
Dolphin isn't responsible for this, but I'm not 100% sure what piece of code is. Starting with KIO.
(In reply to Nate Graham from comment #8) > Dolphin isn't responsible for this, but I'm not 100% sure what piece of code > is. Starting with KIO. I checked it in KDE Neon in VM, but there is no issue in KDE Neon. Manjaro KDE has this issue.
(In reply to Nate Graham from comment #6) > Created attachment 125750 [details] > Test case file > > Bizarre. Can confirm. > > It seems like some code somewhere is unconditionally checking for "use > strict" to determine which icon to show. It's shared-mime-info. I'm not sure the attached test case is a valid HTML file (why would you put a perl script in a HTML page?). If it is, then the bug should be reported upstream at: https://gitlab.freedesktop.org/xdg/shared-mime-info
Fixed: https://gitlab.freedesktop.org/xdg/shared-mime-info/commit/18bb7cfc6c43d710ecf60339b5dd9bd19c297cdf
(In reply to David Faure from comment #11) > Fixed: > https://gitlab.freedesktop.org/xdg/shared-mime-info/commit/ > 18bb7cfc6c43d710ecf60339b5dd9bd19c297cdf Could you please make sure to file a merge request instead of pushing directly to master?
I think they did. https://gitlab.freedesktop.org/xdg/shared-mime-info/-/tree/master/
Bastien: OK. I thought this one was pretty non-controversial, but I'll use merge requests in the future.
(In reply to David Faure from comment #14) > Bastien: OK. I thought this one was pretty non-controversial, but I'll use > merge requests in the future. It's not about controversy, there's a CI that makes sure that no regressions happen, and we want to make sure they're triggered before things get merged.