fix build errors
This commit is contained in:
parent
88abec1d61
commit
2a10ceca38
|
@ -90,7 +90,7 @@ func (b *BackBalze) Sync(ctx context.Context) error {
|
|||
if b.filePath != "" {
|
||||
log.Println("file:", b.filePath)
|
||||
|
||||
if _, err := copyFile(ctx, bc, b.filePath); err != nil {
|
||||
if err := copyFile(ctx, bc, b.filePath); err != nil {
|
||||
return fmt.Errorf("copyFile %w", err)
|
||||
}
|
||||
return nil
|
||||
|
@ -120,12 +120,11 @@ func (b *BackBalze) Sync(ctx context.Context) error {
|
|||
go func() {
|
||||
defer wg.Done()
|
||||
for src := range fileChan {
|
||||
msg, err := copyFile(ctx, bc, src)
|
||||
err := copyFile(ctx, bc, src)
|
||||
if err != nil {
|
||||
log.Printf("error copying file %s: %v\n", src, err)
|
||||
continue
|
||||
}
|
||||
msgsChan <- msg
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
@ -187,7 +186,7 @@ func (b *BackBalze) OldSync() error {
|
|||
if b.filePath != "" {
|
||||
log.Println("file:", b.filePath)
|
||||
|
||||
if _, err := copyFile(ctx, bc, b.filePath); err != nil {
|
||||
if err := copyFile(ctx, bc, b.filePath); err != nil {
|
||||
return fmt.Errorf("copyFile %w", err)
|
||||
}
|
||||
return nil
|
||||
|
@ -223,7 +222,7 @@ func (b *BackBalze) OldSync() error {
|
|||
}
|
||||
if err := uploadSem.Acquire(ctx, weight); err == nil {
|
||||
log.Println("start copying file", src)
|
||||
if _, err := copyFile(ctx, bc, src); err != nil {
|
||||
if err := copyFile(ctx, bc, src); err != nil {
|
||||
log.Printf("error copying file %s: %v\n", src, err)
|
||||
}
|
||||
uploadSem.Release(weight)
|
||||
|
|
Loading…
Reference in New Issue