aboutsummaryrefslogtreecommitdiff
path: root/tar.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-02 15:04:05 +0200
committern-peugnet <n.peugnet@free.fr>2021-09-02 15:04:05 +0200
commit9387c79a1862e7572ffc59919c05cf1dc9aeeae5 (patch)
treed3e037378edacff40a242434ed1d3fe971051be3 /tar.go
parent1dec2cdc84a6497c893d84485c6f94589f997215 (diff)
downloaddna-backup-9387c79a1862e7572ffc59919c05cf1dc9aeeae5.tar.gz
dna-backup-9387c79a1862e7572ffc59919c05cf1dc9aeeae5.zip
find similar chunks while matching stream
Diffstat (limited to 'tar.go')
-rw-r--r--tar.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/tar.go b/tar.go
index e811840..e2703c8 100644
--- a/tar.go
+++ b/tar.go
@@ -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)
}
}