Fixed exception when files were updated while script was running.
m_UpdatedFiles was being updated while it was still being used by the script thread. Instead, copy the list, clear it out, and have the script thread process the copy.
This commit is contained in:
parent
e9ac96f2bc
commit
8a1c541b7e
|
@ -571,10 +571,11 @@ namespace FileWatcher
|
|||
|
||||
try
|
||||
{
|
||||
updated(m_UpdatedFiles);
|
||||
|
||||
var updateFiles = m_UpdatedFiles;
|
||||
m_UpdatedFiles.Clear();
|
||||
|
||||
updated(updateFiles);
|
||||
|
||||
Logger.Log("Just finished running '" + ScriptPath + "'");
|
||||
|
||||
Form1.Instance.notifyIcon1.ShowBalloonTip(500, "Script Ran", "Finished running '" + ScriptPath + "'", ToolTipIcon.Info);
|
||||
|
|
Loading…
Reference in New Issue