Don't create FileSystemWatcher for missing directories
This commit is contained in:
parent
cf2b83b102
commit
f625771cd0
|
@ -279,6 +279,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
|
||||
var (dir, file) = item.Path.MakeProgramRelativePath().SplitPathToDirAndFile();
|
||||
|
||||
// prevent error when (auto)loading session referencing scripts in deleted/renamed directories
|
||||
if (!Directory.Exists(dir))
|
||||
return;
|
||||
|
||||
var watcher = new FileSystemWatcher
|
||||
{
|
||||
Path = dir,
|
||||
|
|
Loading…
Reference in New Issue