From 8dd7dd42cfa275ddacee843dd38a32afddfc94aa Mon Sep 17 00:00:00 2001 From: Aaron Boodman Date: Sat, 7 Sep 2013 19:15:44 -0700 Subject: [PATCH] Fix crash in `camput file` when configuration discovery has failed. Change-Id: I8a7ac26e5d550f25eddf149dadde5013a1d50fe7 --- cmd/camput/files.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/camput/files.go b/cmd/camput/files.go index 7e069eebd..e210c7ea4 100644 --- a/cmd/camput/files.go +++ b/cmd/camput/files.go @@ -209,10 +209,10 @@ func (c *fileCmd) RunCommand(args []string) error { if len(args) == 0 { return cmdmain.UsageError("No files or directories given.") } - if c.havecache { + if up.haveCache != nil { defer up.haveCache.Close() } - if c.statcache { + if up.statCache != nil { defer up.statCache.Close() } for _, filename := range args {