From 92ccb7e463350193fe34023d650d375f2991a54c Mon Sep 17 00:00:00 2001 From: Leigh Date: Fri, 10 Dec 2021 16:06:12 +0100 Subject: [PATCH] Fix for Installed packages not being removed correctly When a package is remove in some instance the system complains that a file still exists in the deleting directory but there is not file. Added true parameter to the Directory delete for force the removal. Directory.Delete(Path.GetDirectoryName(filepath), true); --- Oqtane.Server/Infrastructure/InstallationManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/Infrastructure/InstallationManager.cs b/Oqtane.Server/Infrastructure/InstallationManager.cs index 259048bc..22a8176d 100644 --- a/Oqtane.Server/Infrastructure/InstallationManager.cs +++ b/Oqtane.Server/Infrastructure/InstallationManager.cs @@ -211,7 +211,7 @@ namespace Oqtane.Infrastructure File.Delete(filepath); if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any()) { - Directory.Delete(Path.GetDirectoryName(filepath)); + Directory.Delete(Path.GetDirectoryName(filepath), true); } } }