From b97e6c65e658b3452e4f7cfd81c9a0d4114df7df Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 28 Jul 2021 09:14:14 -0500 Subject: log warning if shared files are in conflict --- src/slskd/Application/SharedFileCache.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/slskd/Application/SharedFileCache.cs') 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; } } -- cgit v1.2.3