Fixed Windows compatibility and made more resilient against unexpected/missing data

This commit is contained in:
Kenneth Skovhede
2026-01-31 11:33:10 +01:00
parent f5293c7821
commit 8e954092e8
5 changed files with 25 additions and 16 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ public class WebModule : IWebModule
using var client = new SourceProvider(url, "", forwardoptions);
await client.Initialize(cancellationToken);
var targetEntry = await client.GetEntry(path ?? "", isFolder: true, cancellationToken).ConfigureAwait(false);
var targetEntry = await client.GetEntry((path ?? "").TrimStart('/'), isFolder: true, cancellationToken).ConfigureAwait(false);
if (targetEntry == null)
throw new DirectoryNotFoundException($"Path not found: {path}");