Fix IKeyManager
Now correctly delete key folder while avoiding issues
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user