aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Application/SharedFileCache.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Application/SharedFileCache.cs')
-rw-r--r--src/slskd/Application/SharedFileCache.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/slskd/Application/SharedFileCache.cs b/src/slskd/Application/SharedFileCache.cs
index c2200daf..7bdc69f3 100644
--- a/src/slskd/Application/SharedFileCache.cs
+++ b/src/slskd/Application/SharedFileCache.cs
@@ -192,6 +192,11 @@ namespace slskd
// qualified name the only time this *should* cause problems is if one of the shares is a subdirectory of another.
foreach (var file in newFiles)
{
+ if (OptionsMonitor.CurrentValue.Filters.File.Any(pattern => Regex.IsMatch(file.Key, pattern)))
+ {
+ continue;
+ }
+
if (files.ContainsKey(file.Key))
{
Log.Warning($"File {file.Key} shared in directory {directory} has already been cached. This is probably a misconfiguration of the shared directories (is a subdirectory being re-shared?).");