From 9b4a2e5f8a1eb2ad62525197aad0600cf5c00de4 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 19 Aug 2021 08:01:56 -0500 Subject: default shares to an empty array. warn if no shares are configured --- src/slskd/Application/SharedFileCache.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/slskd/Application/SharedFileCache.cs') 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; -- cgit v1.2.3