Fix IKeyManager

Now correctly delete key folder while avoiding issues
This commit is contained in:
2021-06-07 16:12:20 +02:00
parent 8027229a7f
commit a3349e23c9
3 changed files with 17 additions and 8 deletions

View File

@@ -110,7 +110,7 @@ namespace Akari.Prototype.Server.Services
public bool Remove(string applicationName)
{
if (!_applications.ContainsKey(applicationName))
if (!_applications.TryGetValue(applicationName, out var application))
{
_logger.LogDebug($"Can't remove non existing application: {applicationName}");
@@ -118,9 +118,9 @@ namespace Akari.Prototype.Server.Services
}
// Clear keys
_keyManager.Clear(applicationName);
_keyManager.Clear(application);
_applications.Remove(applicationName);
_applications.Remove(application.Name);
SaveApplications();