fix #3454 - do not remove Oqtane.lLicensing assemblies during package uninstall
This commit is contained in:
parent
10b89ff00b
commit
bb10d64d58
|
@ -251,10 +251,14 @@ namespace Oqtane.Infrastructure
|
||||||
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))
|
||||||
{
|
{
|
||||||
File.Delete(filepath);
|
// do not remove licensing assemblies - this is a temporary fix until a more robust dependency management solution is available
|
||||||
if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any())
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user