fix!: sign with the raw path instead of filename (#2258)
This commit is contained in:
@ -3,11 +3,12 @@ package common
|
||||
import (
|
||||
"github.com/alist-org/alist/v3/internal/model"
|
||||
"github.com/alist-org/alist/v3/internal/sign"
|
||||
stdpath "path"
|
||||
)
|
||||
|
||||
func Sign(obj model.Obj, encrypt bool) string {
|
||||
func Sign(obj model.Obj, parent string, encrypt bool) string {
|
||||
if obj.IsDir() || !encrypt {
|
||||
return ""
|
||||
}
|
||||
return sign.Sign(obj.GetName())
|
||||
return sign.Sign(stdpath.Join(parent, obj.GetName()))
|
||||
}
|
||||
|
Reference in New Issue
Block a user