aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/IO
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/IO')
-rw-r--r--MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs b/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
index 9fc622c21..a8c923bb0 100644
--- a/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
+++ b/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
@@ -363,6 +363,7 @@ namespace MediaBrowser.Server.Implementations.IO
{
if (string.Equals(i, e.FullPath, StringComparison.OrdinalIgnoreCase))
{
+ Logger.Debug("Watcher ignoring change to {0}", e.FullPath);
return true;
}
@@ -370,6 +371,7 @@ namespace MediaBrowser.Server.Implementations.IO
var parent = Path.GetDirectoryName(i);
if (string.Equals(parent, e.FullPath, StringComparison.OrdinalIgnoreCase))
{
+ Logger.Debug("Watcher ignoring change to {0}", e.FullPath);
return true;
}
@@ -379,10 +381,18 @@ namespace MediaBrowser.Server.Implementations.IO
parent = Path.GetDirectoryName(i);
if (string.Equals(parent, e.FullPath, StringComparison.OrdinalIgnoreCase))
{
+ Logger.Debug("Watcher ignoring change to {0}", e.FullPath);
return true;
}
}
+ if (i.StartsWith(e.FullPath, StringComparison.OrdinalIgnoreCase) ||
+ e.FullPath.StartsWith(i, StringComparison.OrdinalIgnoreCase))
+ {
+ Logger.Debug("Watcher ignoring change to {0}", e.FullPath);
+ return true;
+ }
+
return false;
}))
@@ -390,12 +400,6 @@ namespace MediaBrowser.Server.Implementations.IO
return;
}
- if (tempIgnorePaths.Contains(e.FullPath, StringComparer.OrdinalIgnoreCase))
- {
- Logger.Debug("Watcher requested to ignore change to " + e.FullPath);
- return;
- }
-
Logger.Info("Watcher sees change of type " + e.ChangeType + " to " + e.FullPath);
//Since we're watching created, deleted and renamed we always want the parent of the item to be the affected path