Handling case here walkerr is raised and info is nil

This commit is contained in:
Brendan Fosberry 2014-06-05 14:19:42 -05:00
parent e885648f5a
commit 80dc0ba7ad

View File

@ -5,8 +5,8 @@ import (
"errors"
"fmt"
_ "github.com/lib/pq"
_ "github.com/ziutek/mymysql/godrv"
_ "github.com/mattn/go-sqlite3"
_ "github.com/ziutek/mymysql/godrv"
"log"
"os"
"path/filepath"
@ -318,6 +318,9 @@ func GetMostRecentDBVersion(dirpath string) (version int64, err error) {
version = -1
filepath.Walk(dirpath, func(name string, info os.FileInfo, walkerr error) error {
if walkerr != nil {
return walkerr
}
if !info.IsDir() {
if v, e := NumericComponent(name); e == nil {