Prevent exceptions on removed/missing directories
This commit is contained in:
parent
10c99659e7
commit
ac07aee38d
1 changed files with 2 additions and 1 deletions
|
|
@ -60,7 +60,8 @@ namespace MatterHackers.MatterControl.Library
|
|||
this.ChildContainers = new List<ILibraryContainerLink>();
|
||||
this.Items = new List<ILibraryItem>();
|
||||
#if !__ANDROID__
|
||||
if (AggContext.OperatingSystem == OSType.Windows)
|
||||
if (AggContext.OperatingSystem == OSType.Windows
|
||||
&& Directory.Exists(path))
|
||||
{
|
||||
directoryWatcher = new FileSystemWatcher(path);
|
||||
directoryWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue