aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-08-07 10:11:13 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-08-07 10:11:13 -0500
commit9dbd757fc474df7d34a163b6f42ea4973a07b608 (patch)
tree54d1c65d8bef1ed4d2e9569f3007b4e50e63acd7 /src
parent181fcf9d3cae59f25ad5413661a7eb86831b0c1a (diff)
downloadslskd-9dbd757fc474df7d34a163b6f42ea4973a07b608.tar.gz
deduplicate share hashes
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application/SharedFileCache.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/slskd/Application/SharedFileCache.cs b/src/slskd/Application/SharedFileCache.cs
index b03d3019..ce1d796f 100644
--- a/src/slskd/Application/SharedFileCache.cs
+++ b/src/slskd/Application/SharedFileCache.cs
@@ -133,7 +133,7 @@ namespace slskd
var masks = new Dictionary<string, string>(shares
.Select(s => System.IO.Directory.GetParent(s).FullName)
- .Select(s => new KeyValuePair<string, string>(Compute.MaskHash(s), s)));
+ .Select(s => new KeyValuePair<string, string>(Compute.MaskHash(s), s)).ToHashSet());
Log.Debug("Enumerating shared directories");
swSnapshot = sw.ElapsedMilliseconds;