This commit is contained in:
Łukasz Domeradzki 2024-07-10 00:21:56 +02:00
parent b9beb6ec16
commit 0d8f7b854d
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA

View file

@ -435,12 +435,15 @@ internal static class ArchiKestrel {
}
private static async Task<WebApplication> CreateWebApplication() {
// Try to initialize to custom www folder first
string? webRootPath = Path.Combine(Directory.GetCurrentDirectory(), SharedInfo.WebsiteDirectory);
if (!Directory.Exists(webRootPath)) {
// Try to initialize to standard www folder next
webRootPath = Path.Combine(AppContext.BaseDirectory, SharedInfo.WebsiteDirectory);
if (!Directory.Exists(webRootPath)) {
// Do not attempt to create a new directory, user has explicitly removed it
webRootPath = null;
}
}