From fcde0fb58aa3a4e8aa7fc268c286842de39a9bb5 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 17 Mar 2024 17:34:05 -0500 Subject: ensure blacklist file exists and can be read --- src/slskd/Core/Options.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src') 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 /// /// Gets the CIDR blacklist file path. /// - public string BlacklistFile { get; init; } = string.Empty; - - /// - /// Gets address ranges for all blacklisted CIDRs defined by the configuration file and the blacklist file. - /// - /// An IEnumerable of IPAddressRange objects describing the blacklisted CIDRs. - public IEnumerable GetBlacklistedCIDRs() - { - return BlacklistedCIDRs; - } + [FileExists(FileAccess.Read)] + public string File { get; init; } /// /// Extended validation. -- cgit v1.2.3