1
0
mirror of https://github.com/offen/docker-volume-backup.git synced 2025-05-29 22:07:31 +02:00

Info on filenames is missing on errors when deleting files

This commit is contained in:
Frederik Ring 2025-02-27 13:58:32 +01:00
parent eb4099debd
commit 3a395ba296

View File

@ -179,8 +179,9 @@ func (b *sshStorage) Prune(deadline time.Time, pruningPrefix string) (*storage.P
pruneErr := b.DoPrune(b.Name(), len(matches), len(candidates), deadline, func() error {
for _, match := range matches {
if err := b.sftpClient.Remove(path.Join(b.DestinationPath, match)); err != nil {
return errwrap.Wrap(err, "error removing file")
p := path.Join(b.DestinationPath, match)
if err := b.sftpClient.Remove(p); err != nil {
return errwrap.Wrap(err, fmt.Sprintf("error removing file %s", p))
}
}
return nil