diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-04-28 18:02:15 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-04-28 18:02:15 -0500 |
| commit | 0f79d9f8fd07690e5e3757c1be6f23e1c205dd86 (patch) | |
| tree | f339ea5ec10d60a725d088ff2ac84aad12328618 /src/slskd/Core/Options.cs | |
| parent | 28372896b8dae9fd20b48a2a6bc8e077e91e18ea (diff) | |
| download | slskd-0f79d9f8fd07690e5e3757c1be6f23e1c205dd86.tar.gz | |
make validation work
Diffstat (limited to 'src/slskd/Core/Options.cs')
| -rw-r--r-- | src/slskd/Core/Options.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 0ede272d..81dc09f6 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -1148,11 +1148,12 @@ namespace slskd // kill the application try { - _ = slskd.Blacklist.DetectFormat(File); + // async not supported here, .Result is all we have + _ = slskd.Blacklist.DetectFormat(File).Result; } - catch (FormatException ex) + catch { - results.Add(new ValidationResult(ex.Message)); + results.Add(new ValidationResult("Failed to detect blacklist format. Only CIDR, P2P and DAT formats are supported")); } return results; |
