mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
fix: root
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
68bdf65595
commit
88644664e4
@ -131,6 +131,10 @@ user created with the credentials from options "username" and "password".`,
|
|||||||
server := getServerWithViper(cmd.Flags(), d.store)
|
server := getServerWithViper(cmd.Flags(), d.store)
|
||||||
setupLog(server.Log)
|
setupLog(server.Log)
|
||||||
|
|
||||||
|
root, err := filepath.Abs(server.Root)
|
||||||
|
checkErr(err)
|
||||||
|
server.Root = root
|
||||||
|
|
||||||
handler, err := fbhttp.NewHandler(d.store, server)
|
handler, err := fbhttp.NewHandler(d.store, server)
|
||||||
checkErr(err)
|
checkErr(err)
|
||||||
|
|
||||||
@ -159,9 +163,7 @@ func getServerWithViper(flags *pflag.FlagSet, st *storage.Storage) *settings.Ser
|
|||||||
checkErr(err)
|
checkErr(err)
|
||||||
|
|
||||||
if val, set := getStringViperFlag(flags, "root"); set {
|
if val, set := getStringViperFlag(flags, "root"); set {
|
||||||
root, err := filepath.Abs(val)
|
server.Root = val
|
||||||
checkErr(err)
|
|
||||||
server.Root = root
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if val, set := getStringViperFlag(flags, "baseurl"); set {
|
if val, set := getStringViperFlag(flags, "baseurl"); set {
|
||||||
|
Loading…
Reference in New Issue
Block a user