1
0
mirror of https://github.com/offen/docker-volume-backup.git synced 2025-11-29 05:46:50 +02:00

fix: close backup file (#419)

This commit is contained in:
guangwu
2024-05-16 15:35:28 +08:00
committed by GitHub
parent 9b5ba8958d
commit 4cb47a4818

View File

@@ -51,6 +51,7 @@ func (s *script) encryptArchive() error {
if err != nil {
return errwrap.Wrap(err, fmt.Sprintf("error opening backup file `%s`", s.file))
}
defer src.Close()
if _, err := io.Copy(dst, src); err != nil {
return errwrap.Wrap(err, "error writing ciphertext to file")