diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-10-03 13:51:32 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-10-03 13:51:32 -0500 |
| commit | c2a9302741e79165978fa91da040b6f7e689cc48 (patch) | |
| tree | fb9136e240bca7ca9b41320c4a473731da5d4dab /src/slskd/Files/FileService.cs | |
| parent | a172390967d21b2f95cbb4ceb88de410b1f044c5 (diff) | |
| download | slskd-c2a9302741e79165978fa91da040b6f7e689cc48.tar.gz | |
compensate for late-populated LogDirectory
Diffstat (limited to 'src/slskd/Files/FileService.cs')
| -rw-r--r-- | src/slskd/Files/FileService.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/slskd/Files/FileService.cs b/src/slskd/Files/FileService.cs index 584aab08..70bfc293 100644 --- a/src/slskd/Files/FileService.cs +++ b/src/slskd/Files/FileService.cs @@ -59,10 +59,11 @@ namespace slskd.Files private IEnumerable<string> AllowedDirectories => new[] { - Path.GetFullPath(OptionsMonitor.CurrentValue.Directories.Downloads), - Path.GetFullPath(OptionsMonitor.CurrentValue.Directories.Incomplete), - Path.GetFullPath(Program.LogDirectory), - }; + OptionsMonitor.CurrentValue.Directories.Downloads, + OptionsMonitor.CurrentValue.Directories.Incomplete, + Program.LogDirectory, + }.Where(x => !string.IsNullOrWhiteSpace(x)) + .Select(x => Path.GetFullPath(x)); private ILogger Log { get; } = Serilog.Log.ForContext<FileService>(); private IOptionsMonitor<Options> OptionsMonitor { get; } |
