bugfix: ListFilesExt should join filepaths, not paths

This commit is contained in:
gutmet 2019-01-03 17:11:50 +01:00
parent 16cb002a8d
commit 4ad5c8d93a

View File

@ -8,7 +8,6 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"os/exec" "os/exec"
"path"
"path/filepath" "path/filepath"
"runtime" "runtime"
"strings" "strings"
@ -54,7 +53,7 @@ func ListFilesExt(dir string, ext string) []string {
for _, file := range files { for _, file := range files {
if !file.IsDir() { if !file.IsDir() {
if strings.ToUpper(filepath.Ext(file.Name())) == ext { if strings.ToUpper(filepath.Ext(file.Name())) == ext {
list = append(list, path.Join(dir, file.Name())) list = append(list, filepath.Join(dir, file.Name()))
} }
} }
} }