From 76ff27a9a6cb11d682b5d0d788e6c8af15c35ec0 Mon Sep 17 00:00:00 2001 From: Alexander Weinhold Date: Sat, 19 Nov 2016 01:08:56 +0100 Subject: [PATCH] use full file paths in file listing --- goutil.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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())) } } }