diff --git a/src/models/variables.js b/src/models/variables.js index 9bbc70fa..5f9c4ecd 100644 --- a/src/models/variables.js +++ b/src/models/variables.js @@ -23,7 +23,7 @@ const {GObject} = imports.gi; const {FlatpakSharedModel} = imports.models.shared; const {FlatsealOverrideStatus} = imports.models.overrideStatus; -var VAR_REGEXP = /^\w+=[\S ]+$/; +var VAR_REGEXP = /^[^;]+=[\S ]+$/; var FlatpakVariablesModel = GObject.registerClass({ GTypeName: 'FlatpakVariablesModel', @@ -75,7 +75,7 @@ var FlatpakVariablesModel = GObject.registerClass({ static deserialize(value) { return value - .split(/(?=;[\w\s]+=)/) + .split(/(?=;[^;]+=)/) .map(v => v.replace(/^;/, '')); } diff --git a/tests/src/testModels.js b/tests/src/testModels.js index 780d7d55..930680d3 100644 --- a/tests/src/testModels.js +++ b/tests/src/testModels.js @@ -803,7 +803,7 @@ describe('Model', function() { expect(permissionsDefault.variables).toEqual('TEST=yes'); - permissionsDefault.set_property('variables', 'TEST=yes;TE ST=no'); + permissionsDefault.set_property('variables', 'TEST=yes;TE;ST=no'); GLib.timeout_add(GLib.PRIORITY_HIGH, delay + 1, () => { expect(GLib.access(_environmentOverride, 0)).toEqual(-1);