diff --git a/frontend b/frontend index a9852a50..73080fb5 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit a9852a50b409c7c2d57663e6cf53e0980eee87b3 +Subproject commit 73080fb56d24a57005d8c4e415249693aa615aca diff --git a/http/share.go b/http/share.go index a52f7741..eb2c11a3 100644 --- a/http/share.go +++ b/http/share.go @@ -4,12 +4,12 @@ import ( "crypto/rand" "encoding/base64" "net/http" - "path/filepath" "strconv" "strings" "time" "github.com/filebrowser/filebrowser/types" + "github.com/spf13/afero" ) const apiSharePrefix = "/api/share" @@ -25,7 +25,7 @@ func (e *Env) getShareData(w http.ResponseWriter, r *http.Request, prefix string return "", false } - return filepath.Join(user.Scope, relPath), ok + return afero.FullBaseFsPath(user.Fs.(*afero.BasePathFs), relPath), ok } func (e *Env) shareGetHandler(w http.ResponseWriter, r *http.Request) {