bugfix: ListFilesExt should join filepaths, not paths
This commit is contained in:
parent
16cb002a8d
commit
4ad5c8d93a
|
@ -8,7 +8,6 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
@ -54,7 +53,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, path.Join(dir, file.Name()))
|
||||
list = append(list, filepath.Join(dir, file.Name()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user