aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/IO
diff options
context:
space:
mode:
authorSven Van den brande <sven.vandenbrande@outlook.com>2013-11-02 22:39:49 +0100
committerSven Van den brande <sven.vandenbrande@outlook.com>2013-11-02 22:39:49 +0100
commit96d4b9c43b69c0a31196487994476024d3d8b13b (patch)
tree2d81fb9b119689c9cace40af9a42fee7226cb1cd /MediaBrowser.Server.Implementations/IO
parent8f7021eb424a89ba0ee5c1acc52d03d149583a1a (diff)
parented34b67f512b07ea2e97f8708811cc4150906f12 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Server.Implementations/IO')
-rw-r--r--MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs28
1 files changed, 27 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs b/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
index 330469877..748ba0df4 100644
--- a/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
+++ b/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
@@ -361,7 +361,33 @@ namespace MediaBrowser.Server.Implementations.IO
if (e.ChangeType == WatcherChangeTypes.Changed)
{
// If the parent of an ignored path has a change event, ignore that too
- if (tempIgnorePaths.Any(i => string.Equals(Path.GetDirectoryName(i), e.FullPath, StringComparison.OrdinalIgnoreCase) || string.Equals(i, e.FullPath, StringComparison.OrdinalIgnoreCase)))
+ if (tempIgnorePaths.Any(i =>
+ {
+ if (string.Equals(i, e.FullPath, StringComparison.OrdinalIgnoreCase))
+ {
+ return true;
+ }
+
+ // Go up a level
+ var parent = Path.GetDirectoryName(i);
+ if (string.Equals(parent, e.FullPath, StringComparison.OrdinalIgnoreCase))
+ {
+ return true;
+ }
+
+ // Go up another level
+ if (!string.IsNullOrEmpty(parent))
+ {
+ parent = Path.GetDirectoryName(i);
+ if (string.Equals(parent, e.FullPath, StringComparison.OrdinalIgnoreCase))
+ {
+ return true;
+ }
+ }
+
+ return false;
+
+ }))
{
return;
}