forked from TrueCloudLab/rclone
vendor: update all dependencies
This commit is contained in:
parent
61ff7306ae
commit
696d012c05
952 changed files with 121647 additions and 34334 deletions
8
vendor/github.com/t3rm1n4l/go-mega/mega.go
generated
vendored
8
vendor/github.com/t3rm1n4l/go-mega/mega.go
generated
vendored
|
@ -1529,7 +1529,7 @@ func (u *Upload) Finish() (node *Node, err error) {
|
|||
}
|
||||
|
||||
// Upload a file to the filesystem
|
||||
func (m *Mega) UploadFile(srcpath string, parent *Node, name string, progress *chan int) (*Node, error) {
|
||||
func (m *Mega) UploadFile(srcpath string, parent *Node, name string, progress *chan int) (node *Node, err error) {
|
||||
defer func() {
|
||||
if progress != nil {
|
||||
close(*progress)
|
||||
|
@ -1548,6 +1548,12 @@ func (m *Mega) UploadFile(srcpath string, parent *Node, name string, progress *c
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
e := infile.Close()
|
||||
if err == nil {
|
||||
err = e
|
||||
}
|
||||
}()
|
||||
|
||||
if name == "" {
|
||||
name = filepath.Base(srcpath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue