mirror of
https://github.com/makeworld-the-better-one/amfora.git
synced 2024-09-11 14:55:51 +03:00
🐛 Make sure file:// dir paths end in slash
This commit is contained in:
parent
8ec9bb780c
commit
36455e800b
@ -31,6 +31,10 @@ func handleFile(u string) (*structs.Page, bool) {
|
||||
|
||||
switch mode := fi.Mode(); {
|
||||
case mode.IsDir():
|
||||
// Must end in slash
|
||||
if u[len(u)-1] != '/' {
|
||||
u += "/"
|
||||
}
|
||||
return createDirectoryListing(u)
|
||||
case mode.IsRegular():
|
||||
if fi.Size() > viper.GetInt64("a-general.page_max_size") {
|
||||
|
Loading…
Reference in New Issue
Block a user