Skip to content

Commit

Permalink
chore(filer): big data upload support
Browse files Browse the repository at this point in the history
  • Loading branch information
duanhongyi committed Jul 19, 2024
1 parent 8681ddf commit ad68561
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions cmd/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (d *DryccCmd) volumesClientLs(appID, vol string) error {
}
dirs, _, err := volumes.ListDir(s.Client, appID, name, path, 3000)
if err != nil {
return fmt.Errorf("ls: cannot access '%s': No such file or directory", path)
return err
}

table := d.getDefaultFormatTable([]string{})
Expand Down Expand Up @@ -375,8 +375,12 @@ func (d *DryccCmd) volumesClientCp(appID, src, dst string) error {
if err != nil {
return err
}
if dirs, _, err := volumes.ListDir(s.Client, appID, volumeID, volumePath, 3000); err != nil && len(dirs) == 1 && dirs[0].Type == "file" {
return fmt.Errorf("the volume path cannot be an existing file")
if dirs, _, err := volumes.ListDir(s.Client, appID, volumeID, volumePath, 3000); err == nil {
if len(dirs) == 1 && dirs[0].Type == "file" {
return fmt.Errorf("the volume path cannot be an existing file")
}
} else if strings.Contains(fmt.Sprint(err), "no such file or directory") {
return err
}
return d.volumesClientPostAll(s.Client, appID, volumeID, volumePath, src)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22
require (
github.com/containerd/console v1.0.4
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
github.com/drycc/controller-sdk-go v0.0.0-20240718091507-0b1023ff57d6
github.com/drycc/controller-sdk-go v0.0.0-20240719050058-ae15038505c0
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f
github.com/olekukonko/tablewriter v0.0.5
github.com/schollz/progressbar/v3 v3.14.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/drycc/controller-sdk-go v0.0.0-20240718091507-0b1023ff57d6 h1:+yPzinnVsC1kBUc3dNTqTdEcMYd3gSPALf5kYkjGcOM=
github.com/drycc/controller-sdk-go v0.0.0-20240718091507-0b1023ff57d6/go.mod h1:n6eQe1irJqjwLo/7t9+Dhdv6faSESQN+ATnZRBP3/Uc=
github.com/drycc/controller-sdk-go v0.0.0-20240719050058-ae15038505c0 h1:2ox3Dn4uid7yHTd4y4mj6yEy3kv4YvknN7sR8o6JQEQ=
github.com/drycc/controller-sdk-go v0.0.0-20240719050058-ae15038505c0/go.mod h1:n6eQe1irJqjwLo/7t9+Dhdv6faSESQN+ATnZRBP3/Uc=
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f h1:kgjvUQJeAszDoU1Vo4vTTE92KI8Av3JPb6Qn890niXg=
github.com/drycc/pkg v0.0.0-20240225112316-78fc9239f51f/go.mod h1:n+QxGif6ha9CEoxVnlipxb9IdmerybcUSzTEDFkvjiA=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
Expand Down

0 comments on commit ad68561

Please sign in to comment.