aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Shares/ShareService.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/slskd/Shares/ShareService.cs b/src/slskd/Shares/ShareService.cs
index b76a4898..cb2de7da 100644
--- a/src/slskd/Shares/ShareService.cs
+++ b/src/slskd/Shares/ShareService.cs
@@ -410,6 +410,13 @@ namespace slskd.Shares
}
}
+ var cachedOptions = Local.Repository.FindLatestScan();
+
+ if (cachedOptions == default || cachedOptions.OptionsJson != OptionsMonitor.CurrentValue.Shares.ToJson())
+ {
+ throw new ShareInitializationException("Share options changed since the last scan");
+ }
+
Local.Repository.EnableKeepalive(true);
Log.Debug("Recomputing share statistics...");