aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares/API/Controllers
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-11-07 23:16:26 -0600
committerGitHub <noreply@github.com>2026-11-07 23:16:26 -0600
commitcefdcd02e28b1f02f546002fdd475de4fa03e839 (patch)
tree95bb26f4ed7b60e3739bcd884966a19be1e9ee07 /src/slskd/Shares/API/Controllers
parent2b827344d11e7490b323defa898264cadbdb6089 (diff)
parentdbc308d5e408a2e194a0c70a8fc7592f776aaf11 (diff)
downloadslskd-cefdcd02e28b1f02f546002fdd475de4fa03e839.tar.gz
Merge pull request #1913 from slskd/bugs
Fix a random assortment of bugs
Diffstat (limited to 'src/slskd/Shares/API/Controllers')
-rw-r--r--src/slskd/Shares/API/Controllers/SharesController.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/slskd/Shares/API/Controllers/SharesController.cs b/src/slskd/Shares/API/Controllers/SharesController.cs
index 64d703bd..4e328717 100644
--- a/src/slskd/Shares/API/Controllers/SharesController.cs
+++ b/src/slskd/Shares/API/Controllers/SharesController.cs
@@ -153,15 +153,13 @@ namespace slskd.Shares.API
[ProducesResponseType(409)]
public IActionResult RescanSharesAsync()
{
- try
+ if (Shares.StateMonitor.CurrentValue.Scanning)
{
- _ = Shares.ScanAsync();
- }
- catch (ShareScanInProgressException)
- {
- return Conflict("A share scan is already in progress.");
+ return Conflict("A share scan is already in progress");
}
+ _ = Shares.ScanAsync();
+
return Ok();
}