Skip to content

Commit

Permalink
Merge pull request #140 from dennis/bugfix-autocreate-scripts
Browse files Browse the repository at this point in the history
Autocreate Scripts directory if missing
  • Loading branch information
dennis committed Oct 7, 2021
2 parents 140adfb + 5a9f271 commit a3ed803
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Components/FileMonitor/Lua/FileMonitorInstanceThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public FileMonitorInstanceThread(

foreach (var path in paths)
{
// Make sure directory exists, before monitoring it
Directory.CreateDirectory(path);

var watcher = new FileSystemWatcher(path);
watcher.Created += (_, e) => WatcherOnCreated(e);
watcher.Changed += (_, e) => WatcherOnChanged(e);
Expand Down

0 comments on commit a3ed803

Please sign in to comment.