Fixed #114425 prevent mime pollution on install#209510
Fixed #114425 prevent mime pollution on install#209510rzhao271 merged 1 commit intomicrosoft:mainfrom
Conversation
This software is not a plain text editor, and it's definitely not a file manager. Advertising compatibility with such overrides default OS handlers on many distributions, unnecessarily.
|
Change was originally made for #15741 to list VS Code as an option (not the default) for opening directories and files. Which distribution are you seeing the issue with ? Also did you have a default handler before VS Code was installed |
Tyriar
left a comment
There was a problem hiding this comment.
The most recent understanding I have of this is that the distro is misbehaving as we list mime types that we do handle - we certainly do handle plain text and folders.
From the KDE .desktop docs: https://develop.kde.org/docs/features/desktop-file/
The MimeType field describes the MIME types used by your application, meaning it will influence whether your app will show up as an available option to open or run a certain file. For example, a plain text editor would use plain/text to show up when right clicking a text file and selecting "Open With"
|
Do you have any links to documentation that say the opposite? |
|
An idea I have is to record down the user's default file explorer before updating the desktop and MIME databases, and afterwards, use xdg-mime to set the default for inode/directory back to their preferred file explorer. I'm unsure whether the distro has a default value set in the first place for that MIME type, and whether the xdg-mime command is available. I haven't seen any command that allows us to update the desktop and MIME databases while allowing us to state that we explicitly don't want to be the default application for a given MIME type. |
|
@deepak1556 I'm seeing the behaviour on voidlinux in KDE/Dolphin and Sway/Nemo. I don't think having VSCode advertising Here's another report of people affected by this issue: Please help make it stop 🙏 |
|
I believe the issue is that the commands we use don't control what order the entry gets placed into the file. I've had similar issues with brave, and so I believe it is an alphabetical order issue. I wrote up a comment at #114425 (comment) |
rzhao271
left a comment
There was a problem hiding this comment.
Discussed offline. Merging the PR in to mitigate the issue.
This software is not a plain text editor, and it's definitely not a file manager. Advertising compatibility with such overrides default OS handlers on many distributions, unnecessarily.