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>
Former-commit-id: fc5ff2d807b0b8c6857c71311f061c7322af32df [formerly 19bd77dbaf743c53e7c8db08930e2a9ce6c0b675] [formerly 89f54b49d9d705b9a016827ceb1e7c0face0e56b [formerly 88644664e4
]]
Former-commit-id: 3ff15179a86d330ff5f2a7f6b49b890d3ecd34fd [formerly 483a8a99b3b9dbe13ded1cf7fd608bf27b35a4d0]
Former-commit-id: 8115bd29a2356de1dd1cc2950248c4a3c07580e4
This commit is contained in:
parent
dd16a2e836
commit
6ab8779948
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user