ExpandFolderVariables in Watch folder path

This commit is contained in:
Michael Delpach 2016-01-16 14:55:18 +08:00
parent 1a6ebc97bf
commit 4f2ac5e84f

View file

@ -53,7 +53,7 @@ public virtual void Enable()
{
context = SynchronizationContext.Current ?? new SynchronizationContext();
fileWatcher = new FileSystemWatcher(Settings.FolderPath);
fileWatcher = new FileSystemWatcher(Helpers.ExpandFolderVariables(Settings.FolderPath));
if (!string.IsNullOrEmpty(Settings.Filter)) fileWatcher.Filter = Settings.Filter;
fileWatcher.IncludeSubdirectories = Settings.IncludeSubdirectories;
fileWatcher.Created += fileWatcher_Created;