chore: rename errors

This commit is contained in:
Noah Hsu
2022-06-23 16:03:27 +08:00
parent fd5c3e831d
commit d77dea733f
7 changed files with 21 additions and 24 deletions

View File

@ -1,7 +0,0 @@
package store
import "errors"
var (
ErrMetaNotFound = errors.New("meta not found")
)

View File

@ -2,6 +2,7 @@ package store
import (
"github.com/Xhofe/go-cache"
"github.com/alist-org/alist/v3/internal/errs"
"github.com/alist-org/alist/v3/internal/model"
"github.com/alist-org/alist/v3/pkg/singleflight"
"github.com/alist-org/alist/v3/pkg/utils"
@ -25,7 +26,7 @@ func GetNearestMeta(path string) (*model.Meta, error) {
return nil, err
}
if path == "/" {
return nil, errors.WithStack(ErrMetaNotFound)
return nil, errors.WithStack(errs.MetaNotFound)
}
return GetNearestMeta(stdpath.Dir(path))
}