diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Core/Blacklist.cs | 2 | ||||
| -rw-r--r-- | src/slskd/Core/Options.cs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/slskd/Core/Blacklist.cs b/src/slskd/Core/Blacklist.cs index 56414ad6..76f0b37f 100644 --- a/src/slskd/Core/Blacklist.cs +++ b/src/slskd/Core/Blacklist.cs @@ -151,7 +151,7 @@ public class Blacklist } } - throw new FormatException($"Failed to detect blacklist format. Only CIDR, P2P and DAT formats are supported"); + throw new FormatException("Failed to detect blacklist format. Only CIDR, P2P and DAT formats are supported"); } /// <summary> 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; |
