Create theme dir if needed (#49)

- Use Path.Combine throughout
- Update theme versions
- Update generator version
This commit is contained in:
2024-06-19 17:02:05 -04:00
parent f2f766fc05
commit f59566a3d3
7 changed files with 25 additions and 16 deletions

View File

@@ -218,8 +218,9 @@ let main args =
// Load admin and default themes, and all themes in the /themes directory
do! Maintenance.loadTheme [| ""; "./admin-theme.zip" |] app.Services
do! Maintenance.loadTheme [| ""; "./default-theme.zip" |] app.Services
if Directory.Exists "./themes" then
for themeFile in Directory.EnumerateFiles("./themes", "*-theme.zip") do
let themePath = Path.Combine(".", "themes")
if Directory.Exists themePath then
for themeFile in Directory.EnumerateFiles(themePath, "*-theme.zip") do
do! Maintenance.loadTheme [| ""; themeFile |] app.Services
let _ = app.UseForwardedHeaders()