chore: move errors

This commit is contained in:
Noah Hsu
2022-06-23 15:57:10 +08:00
parent 2612cd7f1c
commit c3040fdfc3
8 changed files with 22 additions and 27 deletions

View File

@ -3,6 +3,7 @@ package fs
import (
"context"
"github.com/alist-org/alist/v3/internal/driver"
"github.com/alist-org/alist/v3/internal/errs"
"github.com/alist-org/alist/v3/internal/operations"
"github.com/pkg/errors"
)
@ -25,7 +26,7 @@ func Move(ctx context.Context, account driver.Driver, srcPath, dstDirPath string
return errors.WithMessage(err, "failed get dst account")
}
if srcAccount.GetAccount() != dstAccount.GetAccount() {
return errors.WithStack(ErrMoveBetweenTwoAccounts)
return errors.WithStack(errs.ErrMoveBetweenTwoAccounts)
}
return operations.Move(ctx, account, srcActualPath, dstDirActualPath)
}