bugfix: ListFilesExt should join filepaths, not paths
This commit is contained in:
parent
16cb002a8d
commit
4ad5c8d93a
|
@ -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()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user