Skip to content

Commit e846a72

Browse files
committed
file: load should propage file not found error
So it could be handled by caller. For example here VictoriaMetrics/VictoriaMetrics#8952
1 parent c5013df commit e846a72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func load(filePath string, maxBytes int) (*Cache, error) {
141141
// Read bucket files from filePath dir.
142142
d, err := os.Open(filePath)
143143
if err != nil {
144-
return nil, fmt.Errorf("cannot open %q: %s", filePath, err)
144+
return nil, fmt.Errorf("cannot open %q: %w", filePath, err)
145145
}
146146
defer func() {
147147
_ = d.Close()

0 commit comments

Comments
 (0)