mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
lib/storage: remove duplicate logging for filepath on errors
This commit is contained in:
parent
813e8402f6
commit
dccd70ce10
@ -393,13 +393,13 @@ func (s *Storage) ListSnapshots() ([]string, error) {
|
|||||||
snapshotsPath := s.path + "/snapshots"
|
snapshotsPath := s.path + "/snapshots"
|
||||||
d, err := os.Open(snapshotsPath)
|
d, err := os.Open(snapshotsPath)
|
||||||
if err != nil {
|
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)
|
defer fs.MustClose(d)
|
||||||
|
|
||||||
fnames, err := d.Readdirnames(-1)
|
fnames, err := d.Readdirnames(-1)
|
||||||
if err != nil {
|
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))
|
snapshotNames := make([]string, 0, len(fnames))
|
||||||
for _, fname := range fnames {
|
for _, fname := range fnames {
|
||||||
|
Loading…
Reference in New Issue
Block a user