mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
add confirm
This commit is contained in:
parent
489db64055
commit
6d3817d6ce
14
setup.go
14
setup.go
@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/hacdias/caddy-filemanager"
|
||||
@ -76,8 +77,17 @@ func setup(c *caddy.Controller) error {
|
||||
log.Panic(err)
|
||||
}
|
||||
|
||||
if val, ok := f.(map[string]interface{})["metaDataFormat"]; ok {
|
||||
format = val.(string)
|
||||
kind := reflect.TypeOf(f)
|
||||
|
||||
if kind == reflect.TypeOf(map[interface{}]interface{}{}) {
|
||||
if val, ok := f.(map[interface{}]interface{})["metaDataFormat"]; ok {
|
||||
format = val.(string)
|
||||
}
|
||||
|
||||
} else {
|
||||
if val, ok := f.(map[string]interface{})["metaDataFormat"]; ok {
|
||||
format = val.(string)
|
||||
}
|
||||
}
|
||||
|
||||
// Generates the Hugo website for the first time the plugin is activated.
|
||||
|
Loading…
Reference in New Issue
Block a user