diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-03-17 17:34:05 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-03-17 17:34:05 -0500 |
| commit | fcde0fb58aa3a4e8aa7fc268c286842de39a9bb5 (patch) | |
| tree | de7aa20c2b886c6208a8efe87e0f7184b552c94a | |
| parent | fcf5cae9457f01c624e2ac98032cb82973e90888 (diff) | |
| download | slskd-fcde0fb58aa3a4e8aa7fc268c286842de39a9bb5.tar.gz | |
ensure blacklist file exists and can be read
| -rw-r--r-- | src/slskd/Core/Options.cs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index add3953a..e0ee1aa4 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -994,16 +994,8 @@ namespace slskd /// <summary> /// Gets the CIDR blacklist file path. /// </summary> - public string BlacklistFile { get; init; } = string.Empty; - - /// <summary> - /// Gets address ranges for all blacklisted CIDRs defined by the configuration file and the blacklist file. - /// </summary> - /// <returns>An IEnumerable of IPAddressRange objects describing the blacklisted CIDRs.</returns> - public IEnumerable<IPAddressRange> GetBlacklistedCIDRs() - { - return BlacklistedCIDRs; - } + [FileExists(FileAccess.Read)] + public string File { get; init; } /// <summary> /// Extended validation. |
