diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-12-30 16:16:43 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-12-30 16:16:43 -0500 |
| commit | 52a183804a035e43791a4932a97364993c08f027 (patch) | |
| tree | 3aaae922dc41546b99dfa9bcd616923da9ed3af3 /Emby.Server.Core/IO/LibraryMonitor.cs | |
| parent | 1dea300f6ba88d2d87110b91f8f15c015412794c (diff) | |
verify path exists in realtime monitor
Diffstat (limited to 'Emby.Server.Core/IO/LibraryMonitor.cs')
| -rw-r--r-- | Emby.Server.Core/IO/LibraryMonitor.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Emby.Server.Core/IO/LibraryMonitor.cs b/Emby.Server.Core/IO/LibraryMonitor.cs index 6ed096f44..87b70d047 100644 --- a/Emby.Server.Core/IO/LibraryMonitor.cs +++ b/Emby.Server.Core/IO/LibraryMonitor.cs @@ -288,6 +288,13 @@ namespace Emby.Server.Core.IO { try { + if (!_fileSystem.DirectoryExists(path)) + { + // Seeing a crash in the mono runtime due to an exception being thrown on a different thread + Logger.Info("Skipping realtime monitor for {0} because the path does not exist", path); + return; + } + var newWatcher = new FileSystemWatcher(path, "*") { IncludeSubdirectories = true |
