From a4fcf65d451e9c2629f9f113ca06485b7e564f8e Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 24 Sep 2022 17:32:45 -0500 Subject: fix state bug --- src/slskd/Application.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 4990186e..86d74d4d 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -986,6 +986,8 @@ namespace slskd { var (previous, current) = state; + Console.WriteLine(current); + if (!previous.Scanning && current.Scanning) { // the scan is starting @@ -1025,7 +1027,7 @@ namespace slskd else if (!previous.Ready && current.Ready) { // the share transitioned into ready without completing a scan; it was loaded from disk - State.SetValue(state => state with { Shares = state.Shares with { ScanPending = false } }); + State.SetValue(state => state with { Shares = current with { ScanPending = false } }); Log.Information("Share cache loaded from disk successfully. Sharing {Directories} directories and {Files} files", current.Directories, current.Files); _ = CacheBrowseResponse(); } -- cgit v1.2.3