From dccd70ce108e6817acb68a6270f747cb1b2a8025 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 3 Dec 2022 23:15:22 -0800 Subject: [PATCH] lib/storage: remove duplicate logging for filepath on errors --- lib/storage/storage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 00f88c1954..3db94dd48d 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -393,13 +393,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 {