networkAgent: Pick up VPN service dir from pkg-config

It turns out that NetworkManager does export the directory as pkg-config
variable after all, so use that instead of building the path ourselves
from the prefix.

https://bugzilla.gnome.org/show_bug.cgi?id=789811
This commit is contained in:
Florian Müllner
2018-01-21 21:04:37 +01:00
parent fed5657b40
commit 1d3154a89e
4 changed files with 7 additions and 10 deletions

View File

@ -594,7 +594,7 @@ var NetworkAgent = new Lang.Class({
this._vpnRequests = { };
this._notifications = { };
this._pluginDir = Gio.file_new_for_path(GLib.build_filenamev([Config.NMPREFIXDIR, 'lib/NetworkManager/VPN']));
this._pluginDir = Gio.file_new_for_path(Config.VPNDIR);
try {
let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);
monitor.connect('changed', () => { this._vpnCacheBuilt = false; });