From bb10d64d58aa09fe1eb5d9f9cf563bd712cb2c87 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 13 Nov 2023 13:16:35 -0500 Subject: [PATCH] fix #3454 - do not remove Oqtane.lLicensing assemblies during package uninstall --- Oqtane.Server/Infrastructure/InstallationManager.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Oqtane.Server/Infrastructure/InstallationManager.cs b/Oqtane.Server/Infrastructure/InstallationManager.cs index 835350b6..f29b3aba 100644 --- a/Oqtane.Server/Infrastructure/InstallationManager.cs +++ b/Oqtane.Server/Infrastructure/InstallationManager.cs @@ -251,10 +251,14 @@ namespace Oqtane.Infrastructure string filepath = asset.StartsWith("\\") ? Path.Combine(_environment.ContentRootPath, asset.Substring(1)) : asset; if (File.Exists(filepath)) { - File.Delete(filepath); - if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any()) + // do not remove licensing assemblies - this is a temporary fix until a more robust dependency management solution is available + if (!filepath.Contains("Oqtane.Licensing.")) { - Directory.Delete(Path.GetDirectoryName(filepath), true); + File.Delete(filepath); + if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any()) + { + Directory.Delete(Path.GetDirectoryName(filepath), true); + } } } }