Skip to content

Commit ad68561

Browse files
committed
chore(filer): big data upload support
1 parent 8681ddf commit ad68561

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

cmd/volumes.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (d *DryccCmd) volumesClientLs(appID, vol string) error {
254254
}
255255
dirs, _, err := volumes.ListDir(s.Client, appID, name, path, 3000)
256256
if err != nil {
257-
return fmt.Errorf("ls: cannot access '%s': No such file or directory", path)
257+
return err
258258
}
259259

260260
table := d.getDefaultFormatTable([]string{})
@@ -375,8 +375,12 @@ func (d *DryccCmd) volumesClientCp(appID, src, dst string) error {
375375
if err != nil {
376376
return err
377377
}
378-
if dirs, _, err := volumes.ListDir(s.Client, appID, volumeID, volumePath, 3000); err != nil && len(dirs) == 1 && dirs[0].Type == "file" {
379-
return fmt.Errorf("the volume path cannot be an existing file")
378+
if dirs, _, err := volumes.ListDir(s.Client, appID, volumeID, volumePath, 3000); err == nil {
379+
if len(dirs) == 1 && dirs[0].Type == "file" {
380+
return fmt.Errorf("the volume path cannot be an existing file")
381+
}
382+
} else if strings.Contains(fmt.Sprint(err), "no such file or directory") {
383+
return err
380384
}
381385
return d.volumesClientPostAll(s.Client, appID, volumeID, volumePath, src)
382386
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.22
55
require (
66
github.com/containerd/console v1.0.4
77
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
8-
github.com/drycc/controller-sdk-go v0.0.0-20240718091507-0b1023ff57d6
8+
github.com/drycc/controller-sdk-go v0.0.0-20240719050058-ae15038505c0
99
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f
1010
github.com/olekukonko/tablewriter v0.0.5
1111
github.com/schollz/progressbar/v3 v3.14.4

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
55
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
66
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=
77
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
8-
github.com/drycc/controller-sdk-go v0.0.0-20240718091507-0b1023ff57d6 h1:+yPzinnVsC1kBUc3dNTqTdEcMYd3gSPALf5kYkjGcOM=
9-
github.com/drycc/controller-sdk-go v0.0.0-20240718091507-0b1023ff57d6/go.mod h1:n6eQe1irJqjwLo/7t9+Dhdv6faSESQN+ATnZRBP3/Uc=
8+
github.com/drycc/controller-sdk-go v0.0.0-20240719050058-ae15038505c0 h1:2ox3Dn4uid7yHTd4y4mj6yEy3kv4YvknN7sR8o6JQEQ=
9+
github.com/drycc/controller-sdk-go v0.0.0-20240719050058-ae15038505c0/go.mod h1:n6eQe1irJqjwLo/7t9+Dhdv6faSESQN+ATnZRBP3/Uc=
1010
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f h1:kgjvUQJeAszDoU1Vo4vTTE92KI8Av3JPb6Qn890niXg=
1111
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f/go.mod h1:n+QxGif6ha9CEoxVnlipxb9IdmerybcUSzTEDFkvjiA=
1212
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=

0 commit comments

Comments
 (0)