After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793137 - MacOS: Backport of content-type fixes from #788401 and #788936 to 2.54
MacOS: Backport of content-type fixes from #788401 and #788936 to 2.54
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.54.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on: 788401 788936
Blocks:
 
 
Reported: 2018-02-03 10:31 UTC by Friedrich Beckmann
Modified: 2018-02-26 11:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Friedrich Beckmann 2018-02-03 10:31:11 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
Comment 1 Friedrich Beckmann 2018-02-03 12:46:52 UTC
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)
Comment 2 Friedrich Beckmann 2018-02-03 12:50:15 UTC
Forgot this one:
[OSX: Use xdgmime system to guess content type from data](https://github.com/GNOME/glib/commit/e55efa35e3b1a0b810f7605028406b3)
Comment 3 Philip Withnall 2018-02-22 13:05:05 UTC
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.
Comment 4 Friedrich Beckmann 2018-02-25 16:37:46 UTC
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.
Comment 5 Philip Withnall 2018-02-26 11:08:38 UTC
Merged to glib-2-54, thanks for testing.
Comment 6 Philip Withnall 2018-02-26 11:10:30 UTC
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).
Comment 7 Friedrich Beckmann 2018-02-26 11:15:57 UTC
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.