From acd2dbf9c3d4dcc0fae89be2cd3d3e1ef09dfc8b Mon Sep 17 00:00:00 2001 From: Jonathan Bout Date: Mon, 4 May 2026 17:12:06 +0200 Subject: [PATCH 1/2] Update IndexGenerator.cs --- src/core/Services/Implementations/IndexGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Services/Implementations/IndexGenerator.cs b/src/core/Services/Implementations/IndexGenerator.cs index d2a3e80..92784bf 100644 --- a/src/core/Services/Implementations/IndexGenerator.cs +++ b/src/core/Services/Implementations/IndexGenerator.cs @@ -157,7 +157,7 @@ private void AppendRow(StringBuilder index, string href, string name, string ico } DateTime lastModified = info.LastWriteTimeUtc; - var directoryListing = new JsonIndexModel([], requestPathString, lastModified); + var directoryListing = new JsonIndexModel([], Path.GetDirectoryName(requestPathString), lastModified); foreach (FileSystemInfo item in info.GetFileSystemInfos().OrderBy(i => i.LastWriteTimeUtc).ThenBy(i => i is FileInfo)) { if (item.Name.StartsWith('.') && !_options.CurrentValue.ShowDotFiles) From 558f05e421db7c2b91c5b38be0191e79de9a4c6e Mon Sep 17 00:00:00 2001 From: Jonathan Bout Date: Mon, 4 May 2026 17:14:22 +0200 Subject: [PATCH 2/2] Update IndexGenerator.cs --- src/core/Services/Implementations/IndexGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Services/Implementations/IndexGenerator.cs b/src/core/Services/Implementations/IndexGenerator.cs index 92784bf..96dcd36 100644 --- a/src/core/Services/Implementations/IndexGenerator.cs +++ b/src/core/Services/Implementations/IndexGenerator.cs @@ -157,7 +157,7 @@ private void AppendRow(StringBuilder index, string href, string name, string ico } DateTime lastModified = info.LastWriteTimeUtc; - var directoryListing = new JsonIndexModel([], Path.GetDirectoryName(requestPathString), lastModified); + var directoryListing = new JsonIndexModel([], Path.GetDirectoryName(requestPathString) ?? "/", lastModified); foreach (FileSystemInfo item in info.GetFileSystemInfos().OrderBy(i => i.LastWriteTimeUtc).ThenBy(i => i is FileInfo)) { if (item.Name.StartsWith('.') && !_options.CurrentValue.ShowDotFiles)