diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-09-21 20:36:05 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-09-21 20:36:05 -0500 |
| commit | 1887d69479c160c5552f040ea3ba2a4765991602 (patch) | |
| tree | e2c450ef3d366efc4bc3cb39f113896039a37290 | |
| parent | f61ee9c602ba26688db090b0458ab49b768d5170 (diff) | |
| download | slskd-1887d69479c160c5552f040ea3ba2a4765991602.tar.gz | |
create cache if it cant be loaded
| -rw-r--r-- | src/slskd/Application.cs | 5 |
1 files changed, 5 insertions, 0 deletions
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) |
