diff options
author | Alan Pearce | 2025-01-27 21:42:41 +0100 |
---|---|---|
committer | Alan Pearce | 2025-01-28 01:28:32 +0100 |
commit | 127a675fc7cd9cdb65e4b4caac21e0f259102ee8 (patch) | |
tree | 9f2e269187702a4ea26bd776547d99e3832c60a6 /internal/storage/files/writer.go | |
parent | 04809ffd7971032818238db14feb6d3c95470e3b (diff) | |
download | website-127a675fc7cd9cdb65e4b4caac21e0f259102ee8.tar.lz website-127a675fc7cd9cdb65e4b4caac21e0f259102ee8.tar.zst website-127a675fc7cd9cdb65e4b4caac21e0f259102ee8.zip |
serve files from Storage implementation
Diffstat (limited to 'internal/storage/files/writer.go')
-rw-r--r-- | internal/storage/files/writer.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/storage/files/writer.go b/internal/storage/files/writer.go index cd227c0..ce498e7 100644 --- a/internal/storage/files/writer.go +++ b/internal/storage/files/writer.go @@ -6,7 +6,6 @@ import ( "io" "os" "path/filepath" - "strings" "go.alanpearce.eu/x/log" @@ -177,8 +176,5 @@ func (f *Files) Mkdirp(dir string) error { } func (f *Files) join(filename string) string { - if strings.HasSuffix(filename, "/") { - filename = filename + "index.html" - } - return filepath.Join(f.outputDirectory, filename) + return filepath.Join(f.outputDirectory, pathNameToFileName(filename)) } |