mirror of
https://github.com/AlistGo/alist.git
synced 2025-12-22 13:20:07 +08:00
20 lines
409 B
Go
20 lines
409 B
Go
package sign
|
|
|
|
import (
|
|
"github.com/alist-org/alist/v3/internal/op"
|
|
json "github.com/json-iterator/go"
|
|
)
|
|
|
|
func IsStorageSigned(rawPath string) bool {
|
|
storage := op.GetBalancedStorage(rawPath).GetStorage()
|
|
var jsonData = map[string]interface{}{}
|
|
err := json.Unmarshal([]byte(storage.Addition), &jsonData)
|
|
if err != nil {
|
|
return false
|
|
}
|
|
if jsonData["sign"] == "true" {
|
|
return true
|
|
}
|
|
return false
|
|
}
|