Fix crash in `camput file` when configuration discovery has failed.

Change-Id: I8a7ac26e5d550f25eddf149dadde5013a1d50fe7
This commit is contained in:
Aaron Boodman 2013-09-07 19:15:44 -07:00
parent 85473f6849
commit 8dd7dd42cf
1 changed files with 2 additions and 2 deletions

View File

@ -209,10 +209,10 @@ func (c *fileCmd) RunCommand(args []string) error {
if len(args) == 0 { if len(args) == 0 {
return cmdmain.UsageError("No files or directories given.") return cmdmain.UsageError("No files or directories given.")
} }
if c.havecache { if up.haveCache != nil {
defer up.haveCache.Close() defer up.haveCache.Close()
} }
if c.statcache { if up.statCache != nil {
defer up.statCache.Close() defer up.statCache.Close()
} }
for _, filename := range args { for _, filename := range args {