fix: root

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
pull/631/head
Henrique Dias 2019-01-08 14:43:46 +00:00
parent 68bdf65595
commit 88644664e4
1 changed files with 5 additions and 3 deletions

View File

@ -131,6 +131,10 @@ user created with the credentials from options "username" and "password".`,
server := getServerWithViper(cmd.Flags(), d.store)
setupLog(server.Log)
root, err := filepath.Abs(server.Root)
checkErr(err)
server.Root = root
handler, err := fbhttp.NewHandler(d.store, server)
checkErr(err)
@ -159,9 +163,7 @@ func getServerWithViper(flags *pflag.FlagSet, st *storage.Storage) *settings.Ser
checkErr(err)
if val, set := getStringViperFlag(flags, "root"); set {
root, err := filepath.Abs(val)
checkErr(err)
server.Root = root
server.Root = val
}
if val, set := getStringViperFlag(flags, "baseurl"); set {