chmln / handlr

A better xdg-utils
MIT License
633 stars 25 forks source link

handlr clears "Removed Associations" section of mimeapps.list #46

Open nyanpasu64 opened 3 years ago

nyanpasu64 commented 3 years ago

mimeapps.list has a [Removed Associations] section for apps which are removed from the selection order. For example, you can use it to prevent Wine Internet Explorer from trying to handle PDF files (though you're probably better off removing ~/.local/share/applications/wine-extension-*.desktop by hand). This section of the file can be added using GNOME's "Applications" settings page, and opting apps out of specific file extensions.

Unfortunately handlr clears this section when editing mimeapps.list, since it doesn't read it when loading the file, and rewrites the entire mimeapps.list instead of updating the old contents in-place.

Is it possible to preserve the "Removed Associations" section of the file?

chmln commented 3 years ago

Hey @nyanpasu64 we can definitely parse and keep that section of the file. I wasn't aware such a section even exists, thanks for bringing this to attention