mirror of
https://github.com/makew0rld/amfora.git
synced 2024-12-04 14:46:29 -05: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