diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-07-28 09:14:14 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-07-28 09:14:14 -0500 |
| commit | b97e6c65e658b3452e4f7cfd81c9a0d4114df7df (patch) | |
| tree | 2f5df661e4222db4854b9e590b997595361a1b9e /src | |
| parent | ad91fc0692e56a0bec49870c0f1d4bd78e967938 (diff) | |
| download | slskd-b97e6c65e658b3452e4f7cfd81c9a0d4114df7df.tar.gz | |
log warning if shared files are in conflict
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application/SharedFileCache.cs | 7 |
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; } } |
