|
|
@@ -19,8 +19,14 @@ func GetAllFilePath(filePaths []string, currentPath string) ([]string, error) {
|
|
|
}
|
|
|
for _, f := range files {
|
|
|
if f.IsDir() {
|
|
|
- ret, _ := GetAllFilePath(filePaths, filepath.Join(currentPath, f.Name()))
|
|
|
- filePaths = append(filePaths, ret...)
|
|
|
+ ret, err := GetAllFilePath(filePaths, filepath.Join(currentPath, f.Name()))
|
|
|
+ if err != nil {
|
|
|
+ log.Printf("GetAllFilePath eror: %v\n", err)
|
|
|
+ return filePaths, err
|
|
|
+ } else {
|
|
|
+ filePaths = append(filePaths, ret...)
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
filePaths = append(filePaths, filepath.Join(currentPath, f.Name()))
|
|
|
}
|