diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-09-02 15:04:05 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-09-02 15:04:05 +0200 |
commit | 9387c79a1862e7572ffc59919c05cf1dc9aeeae5 (patch) | |
tree | d3e037378edacff40a242434ed1d3fe971051be3 /tar.go | |
parent | 1dec2cdc84a6497c893d84485c6f94589f997215 (diff) | |
download | dna-backup-9387c79a1862e7572ffc59919c05cf1dc9aeeae5.tar.gz dna-backup-9387c79a1862e7572ffc59919c05cf1dc9aeeae5.zip |
find similar chunks while matching stream
Diffstat (limited to 'tar.go')
-rw-r--r-- | tar.go | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -26,18 +26,16 @@ func streamFilesTar(files []File, stream io.WriteCloser) { continue } if err := tarStream.WriteHeader(hdr); err != nil { - log.Printf("Error writing tar header to stream for file '%s': %s\n", f.Path, err) - continue + log.Panicf("Error writing tar header to stream for file '%s': %s\n", f.Path, err) } if _, err := io.Copy(tarStream, file); err != nil { - log.Printf("Error writing file to stream '%s': %s\n", f.Path, err) - continue + log.Panicf("Error writing file to stream '%s': %s\n", f.Path, err) } } if err := tarStream.Close(); err != nil { - log.Fatal("Error closing tar stream:", err) + log.Panic("Error closing tar stream:", err) } if err := stream.Close(); err != nil { - log.Fatal("Error closing stream:", err) + log.Panic("Error closing stream:", err) } } |