aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Application/SharedFileCache.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-08-19 08:25:45 -0500
committerGitHub <noreply@github.com>2021-08-19 08:25:45 -0500
commit7dd91c575265cc27a9bc1183ea12944b1539fce7 (patch)
treef5ac22f5ae77d0314362d3bd4d2bea60c5500666 /src/slskd/Application/SharedFileCache.cs
parentdce059aaa858758f5932dabd31f8dde246d4e7dc (diff)
parent58e56202b7326c26b2a55c04b10f5ec5e5ba436e (diff)
downloadslskd-7dd91c575265cc27a9bc1183ea12944b1539fce7.tar.gz
Merge pull request #157 from slskd/fix-share
Default shares to an empty array. Warn if no shares are configured
Diffstat (limited to 'src/slskd/Application/SharedFileCache.cs')
-rw-r--r--src/slskd/Application/SharedFileCache.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/slskd/Application/SharedFileCache.cs b/src/slskd/Application/SharedFileCache.cs
index 3f050086..4e0d5cd0 100644
--- a/src/slskd/Application/SharedFileCache.cs
+++ b/src/slskd/Application/SharedFileCache.cs
@@ -137,6 +137,11 @@ namespace slskd
.OrderByDescending(share => share.LocalPath.Length) // process subdirectories first. this allows them to be aliased separately from their parent
.ToList();
+ if (!Shares.Any())
+ {
+ Log.Warning("Aborting shared file scan; no shares configured.");
+ }
+
Log.Debug("Enumerating shared directories");
swSnapshot = sw.ElapsedMilliseconds;