aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Core/IO/LibraryMonitor.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-01-05 23:36:59 -0500
committerGitHub <noreply@github.com>2017-01-05 23:36:59 -0500
commit0a202a58f888c4d384a70c571e6d05d09b8020b2 (patch)
treefd06847cb48887d4bfc1087d70a42ea0e5efb6c9 /Emby.Server.Core/IO/LibraryMonitor.cs
parent5ff78b5130d0b2712494f4830a9d4f025b09ede3 (diff)
parent424c83bda8c44c81eff62a26f4e2e65ceaf6de6f (diff)
Merge pull request #2381 from MediaBrowser/dev
Dev
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