From 0f30b959f89993bcec6279c88cd82621af348fb9 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Thu, 27 Feb 2025 13:58:32 +0100 Subject: [PATCH] Info on filenames is missing on errors when deleting files --- internal/storage/ssh/ssh.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/storage/ssh/ssh.go b/internal/storage/ssh/ssh.go index fcdea453..c9045fae 100644 --- a/internal/storage/ssh/ssh.go +++ b/internal/storage/ssh/ssh.go @@ -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