aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-07-28 09:14:14 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-07-28 09:14:14 -0500
commitb97e6c65e658b3452e4f7cfd81c9a0d4114df7df (patch)
tree2f5df661e4222db4854b9e590b997595361a1b9e /src
parentad91fc0692e56a0bec49870c0f1d4bd78e967938 (diff)
downloadslskd-b97e6c65e658b3452e4f7cfd81c9a0d4114df7df.tar.gz
log warning if shared files are in conflict
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application/SharedFileCache.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/slskd/Application/SharedFileCache.cs b/src/slskd/Application/SharedFileCache.cs
index 125872a0..45a810fc 100644
--- a/src/slskd/Application/SharedFileCache.cs
+++ b/src/slskd/Application/SharedFileCache.cs
@@ -83,9 +83,14 @@ namespace slskd
// merge the new dictionary with the rest
// this will overwrite any duplicate keys, but keys are the fully 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)
{
- Console.WriteLine(file.Key);
+ if (files.ContainsKey(file.Key))
+ {
+ Console.WriteLine($"[WARNING] File {file.Key} shared in directory {directory} has already been cached. This is probably a misconfiguration of the shared directories.");
+ }
+
files[file.Key] = file.Value;
}
}