diff --git a/goutil.go b/goutil.go index a2dd04b..06e9f0e 100644 --- a/goutil.go +++ b/goutil.go @@ -2,6 +2,7 @@ package goutil import ( "io/ioutil" + "path" "path/filepath" "strings" ) @@ -28,7 +29,7 @@ func ListFilesExt(dir string, ext string) []string { for _, file := range files { if !file.IsDir() { if strings.ToUpper(filepath.Ext(file.Name())) == ext { - list = append(list, file.Name()) + list = append(list, path.Join(dir, file.Name())) } } }