Fix issue when creating assets.json and folder does not exist. Improve module/theme uninstall to remove empty folders.

This commit is contained in:
Shaun Walker
2021-02-26 09:08:25 -05:00
parent ba54076c61
commit 12fd845ed5
3 changed files with 14 additions and 0 deletions

View File

@ -126,6 +126,10 @@ namespace Oqtane.Infrastructure
{
File.Delete(manifestpath);
}
if (!Directory.Exists(Path.GetDirectoryName(manifestpath)))
{
Directory.CreateDirectory(Path.GetDirectoryName(manifestpath));
}
File.WriteAllText(manifestpath, JsonSerializer.Serialize(assets));
}
}