fileUtils: Remove some compatibility code
The condition was added to keep working with the then-stable version of gjs. We already require a more recent version now, so the compat code is effectively dead. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1077
This commit is contained in:
parent
a0467bf875
commit
a5a6c699c3
@ -76,19 +76,15 @@ function loadInterfaceXML(iface) {
|
|||||||
_ifaceResource._register();
|
_ifaceResource._register();
|
||||||
}
|
}
|
||||||
|
|
||||||
let xml = null;
|
|
||||||
let uri = `resource:///org/gnome/shell/dbus-interfaces/${iface}.xml`;
|
let uri = `resource:///org/gnome/shell/dbus-interfaces/${iface}.xml`;
|
||||||
let f = Gio.File.new_for_uri(uri);
|
let f = Gio.File.new_for_uri(uri);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let [ok_, bytes] = f.load_contents(null);
|
let [ok_, bytes] = f.load_contents(null);
|
||||||
if (bytes instanceof Uint8Array)
|
return imports.byteArray.toString(bytes);
|
||||||
xml = imports.byteArray.toString(bytes);
|
|
||||||
else
|
|
||||||
xml = bytes.toString();
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(`Failed to load D-Bus interface ${iface}`);
|
log(`Failed to load D-Bus interface ${iface}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return xml;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user