diff options
| author | copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> | 2025-12-07 00:08:34 +0000 |
|---|---|---|
| committer | copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> | 2025-12-07 00:08:34 +0000 |
| commit | ea0d7e74ada936d4212129a58bd3a29e09ba8c3e (patch) | |
| tree | dec96821e87e001da3ad1b7314dbff5289efb073 /src | |
| parent | e597b33f070e7a5c80a33865af797e5a2aa3213f (diff) | |
| download | slskd-ea0d7e74ada936d4212129a58bd3a29e09ba8c3e.tar.gz | |
Add validation check for blacklist file when enabled
Co-authored-by: jpdillingham <17145758+jpdillingham@users.noreply.github.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Core/Options.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 254adcab..b93ac5e2 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1252,6 +1252,12 @@ namespace slskd return results; } + if (string.IsNullOrWhiteSpace(File)) + { + results.Add(new ValidationResult("The Enabled field is true, but no File has been specified")); + return results; + } + // loading/validating the entire list will be costly on low spec systems // just make sure that we can detect a valid format and leave it at that // if there's a problem with any of the entries, the load will fail and |
