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);
This commit is contained in:
parent
d093c03d92
commit
92ccb7e463
|
@ -211,7 +211,7 @@ namespace Oqtane.Infrastructure
|
||||||
File.Delete(filepath);
|
File.Delete(filepath);
|
||||||
if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any())
|
if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any())
|
||||||
{
|
{
|
||||||
Directory.Delete(Path.GetDirectoryName(filepath));
|
Directory.Delete(Path.GetDirectoryName(filepath), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user