Skip to content

Commit

Permalink
Info on filenames is missing on errors when deleting files
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 committed Feb 28, 2025
1 parent eb4099d commit 0f30b95
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/storage/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f30b95

Please sign in to comment.