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;
I'd avoid to do the C changes, while you can just use something like this:
try { test(path, GLib.FileTest. IS_SYMLINK) ) read_link( path)
while (GLib.file_
path = GLib.file_
} 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) { query_info( Gio.FILE_ ATTRIBUTE_ STANDARD_ IS_SYMLINK+ ","+
Gio.FILE_ ATTRIBUTE_ STANDARD_ SYMLINK_ TARGET,
Gio.FileQuery InfoFlags. NONE, null) get_is_ symlink( ))
let info = stylesheet.
if (!info.
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