chore: rename VirtualPath
to MountPath
This commit is contained in:
@ -45,7 +45,7 @@ func AddURI(ctx context.Context, uri string, dstDirPath string) error {
|
||||
}
|
||||
DownTaskManager.Submit(task.WithCancelCtx(&task.Task[string]{
|
||||
ID: gid,
|
||||
Name: fmt.Sprintf("download %s to [%s](%s)", uri, storage.GetStorage().VirtualPath, dstDirActualPath),
|
||||
Name: fmt.Sprintf("download %s to [%s](%s)", uri, storage.GetStorage().MountPath, dstDirActualPath),
|
||||
Func: func(tsk *task.Task[string]) error {
|
||||
m := &Monitor{
|
||||
tsk: tsk,
|
||||
|
@ -39,13 +39,13 @@ func TestConnect(t *testing.T) {
|
||||
func TestDown(t *testing.T) {
|
||||
TestConnect(t)
|
||||
err := operations.CreateStorage(context.Background(), model.Storage{
|
||||
ID: 0,
|
||||
VirtualPath: "/",
|
||||
Index: 0,
|
||||
Driver: "Local",
|
||||
Status: "",
|
||||
Addition: `{"root_folder":"../../data"}`,
|
||||
Remark: "",
|
||||
ID: 0,
|
||||
MountPath: "/",
|
||||
Index: 0,
|
||||
Driver: "Local",
|
||||
Status: "",
|
||||
Addition: `{"root_folder":"../../data"}`,
|
||||
Remark: "",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create storage: %+v", err)
|
||||
|
@ -135,7 +135,7 @@ func (m *Monitor) Complete() error {
|
||||
}()
|
||||
for _, file := range files {
|
||||
TransferTaskManager.Submit(task.WithCancelCtx[uint64](&task.Task[uint64]{
|
||||
Name: fmt.Sprintf("transfer %s to [%s](%s)", file.Path, storage.GetStorage().VirtualPath, dstDirActualPath),
|
||||
Name: fmt.Sprintf("transfer %s to [%s](%s)", file.Path, storage.GetStorage().MountPath, dstDirActualPath),
|
||||
Func: func(tsk *task.Task[uint64]) error {
|
||||
defer wg.Done()
|
||||
size, _ := strconv.ParseInt(file.Length, 10, 64)
|
||||
|
Reference in New Issue
Block a user