GNOME Bugzilla – Bug 793137
MacOS: Backport of content-type fixes from #788401 and #788936 to 2.54
Last modified: 2018-02-26 11:15:57 UTC
There is a discussion in Macports how changes regarding the broken handling of content types in the MacOS version of glib/gio should be handled. See: https://github.com/macports/macports-ports/pull/852#issuecomment-362776292 Bug #788401 and #788936 contain the patches involved in this problem. These patches made it to 2.55 so it would now be an idea to port it back to the stable 2.54 release. Content-type handling in MacOS in 2.54 is severely broken. The individual patches and files are listed in the macports problem discussion above. Regards Friedrich
The patches from bug #788401 and bug #788936 are: [MacOS: create_cstr_from_cfstring uses safe conversion](https://github.com/GNOME/glib/commit/2bd423c54c4793784059f983b6269a51e073cda9) [gio: Show icons based on file's mime type on OS X](https://github.com/GNOME/glib/commit/6acaca8831c4c34845b860100effead0f37a8d7c) [gio: Eliminate warnings in cstring conversion on OS X](https://github.com/GNOME/glib/commit/9bcd7800a122c22b7c2684fa50bd93ecd3c936f9) [MacOS: gosxcontenttype.c consider generic icon names also](https://github.com/GNOME/glib/commit/6d0210240ad1054dfec6af8f34bdc4beac9ce1c4) [MacOS: gosxappinfo.c Fix some memory leaks. Fix failure condition.](https://github.com/GNOME/glib/commit/37c0610b4d6b43fc9aea7983d1e82be7fdae6660) [MacOS: fix content type check vs. mime check to show folder icons](https://github.com/GNOME/glib/commit/018b997dd286248a27e80e3310fa69d595ac952a)
Forgot this one: [OSX: Use xdgmime system to guess content type from data](https://github.com/GNOME/glib/commit/e55efa35e3b1a0b810f7605028406b3)
Can you test this branch please? https://gitlab.gnome.org/GNOME/glib/tree/glib-2-54-os-x-mimetype-fixes-793137 It contains the commits you listed, based on the glib-2-54 branch. If it builds and works correctly on OS X, I’ll merge it into glib-2-54 ready for the next maintenance release. Thanks.
Hi Philip, thanks for backporting the changes. I tested the branch on MacOS with pspp and there it works. I can see the correct icons for the different file types. From my point of view you can merge this to glib-2-54.
Merged to glib-2-54, thanks for testing.
If you (or any other OS X people subscribed to this bug) could take a look at bug #793565 as well, that would be much appreciated. I would like to get it resolved for the 2.56 code freeze (in a week).
Hi Philip, thanks for merging! Unfortunatly I only have MacOS El Capitan on my laptop which 10.11.6. The problem in bug #793565 is related to MacOS 10.13.