From 52a183804a035e43791a4932a97364993c08f027 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 30 Dec 2016 16:16:43 -0500 Subject: [PATCH] verify path exists in realtime monitor --- Emby.Server.Core/IO/LibraryMonitor.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Emby.Server.Core/IO/LibraryMonitor.cs b/Emby.Server.Core/IO/LibraryMonitor.cs index 6ed096f441..87b70d0479 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