mirror of
https://github.com/restic/restic.git
synced 2025-12-12 05:11:46 +00:00
backup: rework error reporting for subcommand
This commit is contained in:
@@ -2,6 +2,7 @@ package archiver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"sync"
|
||||
@@ -146,7 +147,7 @@ func (s *FileSaver) saveFile(ctx context.Context, chnker *chunker.Chunker, snPat
|
||||
panic("completed twice")
|
||||
}
|
||||
isCompleted = true
|
||||
fnr.err = err
|
||||
fnr.err = fmt.Errorf("failed to save %v: %w", target, err)
|
||||
fnr.node = nil
|
||||
fnr.stats = ItemStats{}
|
||||
finish(fnr)
|
||||
|
||||
Reference in New Issue
Block a user