networkAgent: Fix another ByteArray => Uint8Array instance
This was missed in commit 7ca418a79a
. As we are dealing with
non-\0-terminated data here, go through GBytes this time.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/189
This commit is contained in:
parent
02d06bb1f3
commit
afe5703710
@ -506,8 +506,12 @@ var VPNRequestHandler = new Lang.Class({
|
||||
try {
|
||||
data = this._dataStdout.peek_buffer();
|
||||
|
||||
keyfile.load_from_data(data.toString(), data.length,
|
||||
GLib.KeyFileFlags.NONE);
|
||||
if (data instanceof Uint8Array)
|
||||
data = imports.byteArray.toGBytes(data);
|
||||
else
|
||||
data = data.toGBytes();
|
||||
|
||||
keyfile.load_from_bytes(data, GLib.KeyFileFlags.NONE);
|
||||
|
||||
if (keyfile.get_integer(VPN_UI_GROUP, 'Version') != 2)
|
||||
throw new Error('Invalid plugin keyfile version, is %d');
|
||||
|
Loading…
Reference in New Issue
Block a user