aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares/SharedFileCache.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-05-14 20:54:58 -0500
committerGitHub <noreply@github.com>2022-05-14 20:54:58 -0500
commita33df63a0a23eeb1fae500f104c621e567b80f61 (patch)
tree09532fbf8eee734c5752726481a9dc55f1fa2af2 /src/slskd/Shares/SharedFileCache.cs
parent9fc26c9cc40767929fed81dbaa93a7a1617faa2e (diff)
parent7caa8e13b7dfefa76dee92897f459514f2983e6b (diff)
downloadslskd-a33df63a0a23eeb1fae500f104c621e567b80f61.tar.gz
Merge pull request #464 from slskd/shares
Account for exclusions when validating shares
Diffstat (limited to 'src/slskd/Shares/SharedFileCache.cs')
-rw-r--r--src/slskd/Shares/SharedFileCache.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/slskd/Shares/SharedFileCache.cs b/src/slskd/Shares/SharedFileCache.cs
index 3e305f08..ac996fa6 100644
--- a/src/slskd/Shares/SharedFileCache.cs
+++ b/src/slskd/Shares/SharedFileCache.cs
@@ -199,11 +199,13 @@ namespace slskd.Shares
Log.Warning("Aborting shared file scan; no shares configured.");
}
- foreach (var share in Shares)
- {
- Log.Information($"Sharing {share.LocalPath} as {share.RemotePath}");
- Log.Debug($"Raw: {share.Raw}, Alias: {share.Alias}, Mask: {share.Mask}, Remote: {share.RemotePath})");
- }
+ Shares.ForEach(s => Log.Debug(s.ToJson()));
+
+ Shares.Where(s => !s.IsExcluded).ToList()
+ .ForEach(s => Log.Information("Sharing {Local} as {Remote}", s.LocalPath, s.RemotePath));
+
+ Shares.Where(s => s.IsExcluded).ToList()
+ .ForEach(s => Log.Information("Excluding {Local}", s.LocalPath));
Log.Debug("Enumerating shared directories");
swSnapshot = sw.ElapsedMilliseconds;