We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 95ad423 + f0ac6d5 commit c8d5afeCopy full SHA for c8d5afe
runsc/container/state_file.go
@@ -383,8 +383,12 @@ func (s *StateFile) load(v any, opts LoadOpts) error {
383
}
384
defer s.UnlockOrDie()
385
386
- metaBytes, err := os.ReadFile(s.statePath())
+ path := s.statePath()
387
+ metaBytes, err := os.ReadFile(path)
388
if err != nil {
389
+ // Caller of this function relies on error code, we cannot return new error,
390
+ // but we need to provide a message with file name.
391
+ log.Warningf("Error loading state file %q: %v", path, err)
392
return err
393
394
return json.Unmarshal(metaBytes, &v)
0 commit comments