mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-01 09:40:19 -05:00
Add fast path to check for empty ignore files (#14782)
This commit is contained in:
parent
580db0c1d2
commit
deee04ae38
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user