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 {