refactor: AppPaths.WwwRoot – zentrale wwwroot-Pfadauflösung

- Neue statische Klasse AppPaths mit WwwRoot-Property
- Dev-Modus: ../../../wwwroot (Quell-Verzeichnis)
- Publish-Modus: Fallback auf BaseDirectory/wwwroot
- Program.cs + RemoteEndpoint.cs nutzen AppPaths statt eigener Logik
This commit is contained in:
Meleki committed 2026-03-15 10:57:14 +01:00
1 parent 49ef6bedc6
commit ab64a843fc
3 files changed
+32 -4

No files matched your search

+1 -1
View File
@@ -241,7 +241,7 @@ public static class RemoteEndpoint
private static async Task<IResult> ServeScript(HttpContext ctx)
{
var scriptPath = Path.Combine(AppContext.BaseDirectory, "wwwroot", "remote.ps1");
var scriptPath = Path.Combine(AppPaths.WwwRoot, "remote.ps1");
if (!File.Exists(scriptPath))
return Results.NotFound("Script nicht gefunden");