Skip to content

Commit

Permalink
Use correct path for file watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermue committed Feb 5, 2023
1 parent 74818e9 commit 744996d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions VpnConnections/TrayApplicationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ public TrayApplicationContext()
vpnConnection.IsConnectedChanged += OnVpnIsConnectedChanged;
vpnConnection.ConnectionStateChanged += OnVpnConnectionStateChanged;

var appFile = GetSettingsFilePath(false);
fileWatcher = new FileSystemWatcher
{
Filter = GetSettingsFilePath(false),
Filter = Path.GetFileName(appFile),
IncludeSubdirectories = false,
NotifyFilter = NotifyFilters.CreationTime | NotifyFilters.LastWrite | NotifyFilters.Size,
Path = Directory.GetCurrentDirectory(),
Path = Path.GetDirectoryName(appFile)!,
};
fileWatcher.Changed += OnWatcherChanged;
fileWatcher.Created += OnWatcherChanged;
Expand Down

0 comments on commit 744996d

Please sign in to comment.