aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Core/IO/LibraryMonitor.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-12-30 16:16:43 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-12-30 16:16:43 -0500
commit52a183804a035e43791a4932a97364993c08f027 (patch)
tree3aaae922dc41546b99dfa9bcd616923da9ed3af3 /Emby.Server.Core/IO/LibraryMonitor.cs
parent1dea300f6ba88d2d87110b91f8f15c015412794c (diff)
verify path exists in realtime monitor
Diffstat (limited to 'Emby.Server.Core/IO/LibraryMonitor.cs')
-rw-r--r--Emby.Server.Core/IO/LibraryMonitor.cs7
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