lib/storage: remove duplicate logging for filepath on errors

This commit is contained in:
Aliaksandr Valialkin 2022-12-03 23:15:22 -08:00
parent 044a304adb
commit 932c1f90ae
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -378,13 +378,13 @@ func (s *Storage) ListSnapshots() ([]string, error) {
snapshotsPath := s.path + "/snapshots"
d, err := os.Open(snapshotsPath)
if err != nil {
return nil, fmt.Errorf("cannot open %q: %w", snapshotsPath, err)
return nil, fmt.Errorf("cannot open snapshots directory: %w", err)
}
defer fs.MustClose(d)
fnames, err := d.Readdirnames(-1)
if err != nil {
return nil, fmt.Errorf("cannot read contents of %q: %w", snapshotsPath, err)
return nil, fmt.Errorf("cannot read snapshots directory at %q: %w", snapshotsPath, err)
}
snapshotNames := make([]string, 0, len(fnames))
for _, fname := range fnames {