From 1887d69479c160c5552f040ea3ba2a4765991602 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 21 Sep 2022 20:36:05 -0500 Subject: create cache if it cant be loaded --- src/slskd/Application.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index cab2b649..a64fdf36 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -375,6 +375,11 @@ namespace slskd { Log.Warning("Unable to load share cache from disk. A share scan is required."); + // drop all of the existing tables and recreate them + Log.Information("Recreating share cache..."); + await Shares.CreateAsync(discardExisting: true); + Log.Information("Share cache ready."); + State.SetValue(state => state with { Shares = state.Shares with { ScanPending = true } }); if (OptionsAtStartup.Flags.NoShareScan) -- cgit v1.2.3