chore: cancel sign if no password

This commit is contained in:
Noah Hsu
2022-09-11 14:14:14 +08:00
parent fd99c2197b
commit 77a6aa487b
2 changed files with 20 additions and 8 deletions

View File

@ -5,8 +5,8 @@ import (
"github.com/alist-org/alist/v3/internal/sign"
)
func Sign(obj model.Obj) string {
if obj.IsDir() {
func Sign(obj model.Obj, encrypt bool) string {
if obj.IsDir() || !encrypt {
return ""
}
return sign.Sign(obj.GetName())