diff --git a/versioner/staggered.go b/versioner/staggered.go index a31dc7a42..8910fc7d8 100644 --- a/versioner/staggered.go +++ b/versioner/staggered.go @@ -39,15 +39,7 @@ type Staggered struct { // Check if file or dir func isFile(path string) bool { - fileordir := path - file, err := os.Open(fileordir) - if err != nil { - l.Infoln("versioner isFile:", err) - return false - } - defer file.Close() - - fileInfo, err := file.Stat() + fileInfo, err := os.Stat(path) if err != nil { l.Infoln("versioner isFile:", err) return false