After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773893 - networkAgent: Invalidate VPN plugin cache on changes
networkAgent: Invalidate VPN plugin cache on changes
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2016-11-03 13:07 UTC by Florian Müllner
Modified: 2016-11-10 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
networkAgent: Invalidate VPN plugin cache on changes (2.88 KB, patch)
2016-11-03 13:07 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2016-11-03 13:07:24 UTC
See patch.
Comment 1 Florian Müllner 2016-11-03 13:07:29 UTC
Created attachment 339021 [details] [review]
networkAgent: Invalidate VPN plugin cache on changes

Currently the cache is built once when the first VPN request is
handled, so plugins that are installed or uninstalled after that
aren't picked up. Fix this by invalidating the cache on changes
to the plugin directory.
Comment 2 Rui Matos 2016-11-07 15:01:14 UTC
Review of attachment 339021 [details] [review]:

::: js/ui/components/networkAgent.js
@@ +617,3 @@
 
+        this._pluginDir = Gio.file_new_for_path(GLib.build_filenamev([Config.SYSCONFDIR, 'NetworkManager/VPN']));
+        let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);

wouldn't hurt to wrap this in a try/catch block
Comment 3 Florian Müllner 2016-11-10 13:40:39 UTC
Attachment 339021 [details] pushed as 15be562 - networkAgent: Invalidate VPN plugin cache on changes

(In reply to Rui Matos from comment #2)
> wouldn't hurt to wrap this in a try/catch block

Right, did that.