diff options
author | Liu Hua <sdu.liu@huawei.com> | 2019-05-16 16:19:34 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-05-16 16:20:42 -0700 |
commit | fc9f7e3590492e3236e886a533974a786be47124 (patch) | |
tree | 1a4257f30b09a5232b7c423178c4885907c383a3 /runsc/specutils | |
parent | 40419a16eb8bfbfd9bbb4e20957a5ec9e846a22a (diff) |
tiny fix: avoid panicing when OpenSpec failed
Signed-off-by: Liu Hua <sdu.liu@huawei.com>
Change-Id: I11a4620394a10a7d92036b0341e0c21ad50bd122
PiperOrigin-RevId: 248621810
Diffstat (limited to 'runsc/specutils')
-rw-r--r-- | runsc/specutils/specutils.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/specutils/specutils.go b/runsc/specutils/specutils.go index c72207fb4..2888f55db 100644 --- a/runsc/specutils/specutils.go +++ b/runsc/specutils/specutils.go @@ -149,7 +149,7 @@ func OpenSpec(bundleDir string) (*os.File, error) { func ReadSpec(bundleDir string) (*specs.Spec, error) { specFile, err := OpenSpec(bundleDir) if err != nil { - return nil, fmt.Errorf("error opening spec file %q: %v", specFile.Name(), err) + return nil, fmt.Errorf("error opening spec file %q: %v", filepath.Join(bundleDir, "config.json"), err) } defer specFile.Close() return ReadSpecFromFile(bundleDir, specFile) |