perf: extract fs func and add error log
This commit is contained in:
@ -3,7 +3,6 @@ package fs
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/alist-org/alist/v3/internal/driver"
|
||||
"github.com/alist-org/alist/v3/internal/errs"
|
||||
"github.com/alist-org/alist/v3/internal/model"
|
||||
"github.com/alist-org/alist/v3/internal/operations"
|
||||
@ -17,7 +16,7 @@ var UploadTaskManager = task.NewTaskManager[uint64](3, func(tid *uint64) {
|
||||
})
|
||||
|
||||
// Put add as a put task
|
||||
func Put(ctx context.Context, account driver.Driver, dstDirPath string, file model.FileStreamer) error {
|
||||
func put(ctx context.Context, dstDirPath string, file model.FileStreamer) error {
|
||||
account, dstDirActualPath, err := operations.GetAccountAndActualPath(dstDirPath)
|
||||
if account.Config().NoUpload {
|
||||
return errors.WithStack(errs.UploadNotSupported)
|
||||
|
Reference in New Issue
Block a user