diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-09-04 12:23:54 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-09-04 12:23:54 -0500 |
| commit | 731b371d25e84536745f3987cc83344d8e7e0262 (patch) | |
| tree | 749fa5c99b5dccc10fc423dc6198e9b7ab669cfd /src | |
| parent | e609fe8e4e7fca623a939cb6ecf73979a8666a45 (diff) | |
| download | slskd-731b371d25e84536745f3987cc83344d8e7e0262.tar.gz | |
log warning for unsupported directories and files
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Shares/SharedFileCache.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/slskd/Shares/SharedFileCache.cs b/src/slskd/Shares/SharedFileCache.cs index 3a41f61b..9902c951 100644 --- a/src/slskd/Shares/SharedFileCache.cs +++ b/src/slskd/Shares/SharedFileCache.cs @@ -253,6 +253,12 @@ namespace slskd.Shares { Log.Debug("Starting scan of {Directory} ({Current}/{Total})", directory, current + 1, unmaskedDirectories.Count); + if (Path.DirectorySeparatorChar == '/' && directory.Contains('\\')) + { + Log.Warning("Directory name {Directory} contains one or more backslashes, which are not currently supported. This directory will not be shared.", directory); + continue; + } + var addedFiles = 0L; var filteredFiles = 0L; @@ -287,6 +293,12 @@ namespace slskd.Shares continue; } + if (Path.DirectorySeparatorChar == '/' && file.Value.Filename.Contains('\\')) + { + Log.Warning("Filename {Filename} contains one or more backslashes, which are not currently supported. This file will not be shared.", file.Value.Filename); + continue; + } + if (files.ContainsKey(file.Key)) { Log.Warning($"File {file.Key} shared in directory {directory} has already been cached. This is probably a misconfiguration of the shared directories (is a subdirectory being re-shared?)."); |
