Avoid creating www directory if it doesn't exist yet

Fixes nixOS packaging issues
This commit is contained in:
Archi 2021-11-29 22:35:53 +01:00
parent 85437774de
commit 67c5e1f7c4
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA

View file

@ -113,7 +113,9 @@ internal static class ArchiKestrel {
builder.ConfigureWebHostDefaults(
webBuilder => {
// Set default web root
webBuilder.UseWebRoot(websiteDirectory);
if (Directory.Exists(websiteDirectory)) {
webBuilder.UseWebRoot(websiteDirectory);
}
// Now conditionally initialize settings that are not possible to override
if (customConfigExists) {