aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs')
-rw-r--r--Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs b/Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs
index 401ca73b8..bafe3ad43 100644
--- a/Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs
+++ b/Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs
@@ -50,6 +50,13 @@ public class DotIgnoreIgnoreRule : IResolverIgnoreRule
return false;
}
+ // Fast path in case the ignore files isn't a symlink and is empty
+ if ((dirIgnoreFile.Attributes & FileAttributes.ReparsePoint) == 0
+ && dirIgnoreFile.Length == 0)
+ {
+ return true;
+ }
+
// ignore the directory only if the .ignore file is empty
// evaluate individual files otherwise
return string.IsNullOrWhiteSpace(GetFileContent(dirIgnoreFile));