Merge pull request #3472 from sbwalker/dev

fix #3454 - do not remove Oqtane.lLicensing assemblies during package uninstall
This commit is contained in:
Shaun Walker
2023-11-13 13:16:56 -05:00
committed by GitHub

View File

@@ -250,6 +250,9 @@ namespace Oqtane.Infrastructure
// legacy support for assets that were stored as absolute paths // legacy support for assets that were stored as absolute paths
string filepath = asset.StartsWith("\\") ? Path.Combine(_environment.ContentRootPath, asset.Substring(1)) : asset; string filepath = asset.StartsWith("\\") ? Path.Combine(_environment.ContentRootPath, asset.Substring(1)) : asset;
if (File.Exists(filepath)) if (File.Exists(filepath))
{
// do not remove licensing assemblies - this is a temporary fix until a more robust dependency management solution is available
if (!filepath.Contains("Oqtane.Licensing."))
{ {
File.Delete(filepath); File.Delete(filepath);
if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any()) if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any())
@@ -258,6 +261,7 @@ namespace Oqtane.Infrastructure
} }
} }
} }
}
// clean up package asset manifests // clean up package asset manifests
foreach (string asset in packages) foreach (string asset in packages)