[Merge] ~didrocks/ubuntu/+source/gnome-shell:resolve-gdm-symlink into ~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/master
Marco Trevisan (TreviƱo)
mail at 3v1n0.net
Mon Oct 22 13:48:03 UTC 2018
I'd avoid to do the C changes, while you can just use something like this:
try {
while (GLib.file_test(path, GLib.FileTest.IS_SYMLINK))
path = GLib.file_read_link(path)
} catch (e) {}
Or even avoiding the file_test check (and replacing it with `true`, since the catch will stop the while anyway).
Another option, just using GFile is instead:
while (true) {
let info = stylesheet.query_info(Gio.FILE_ATTRIBUTE_STANDARD_IS_SYMLINK+","+
Gio.FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET,
Gio.FileQueryInfoFlags.NONE, null)
if (!info.get_is_symlink())
break;
stylesheet = Gio.file_new_for_path(info.get_symlink_target())
}
So we have less stuff touched and we keep using the glib way.
Also please mention in the patch msg that this could be removed when we've a session refactor as part of this https://gitlab.gnome.org/GNOME/gdm/merge_requests/33
--
https://code.launchpad.net/~didrocks/ubuntu/+source/gnome-shell/+git/gnome-shell/+merge/357609
Your team Ubuntu Desktop is requested to review the proposed merge of ~didrocks/ubuntu/+source/gnome-shell:resolve-gdm-symlink into ~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/master.
More information about the ubuntu-desktop
mailing list