File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
kadai2/tanaka0325/imgconv/cmd/imgconv Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ func main() {
61
61
}
62
62
}
63
63
64
- paths , err := getTargetFilenames (dirnames , from )
64
+ paths , err := getTargetFilepaths (dirnames , from )
65
65
if err != nil {
66
66
onExit (err )
67
67
}
@@ -110,14 +110,20 @@ func uniq([]string) []string {
110
110
return u
111
111
}
112
112
113
- func getTargetFilenames (ds []string , ext string ) ([]string , error ) {
113
+ func getTargetFilepaths (ds []string , ext string ) ([]string , error ) {
114
114
var names []string
115
+
115
116
for _ , n := range ds {
116
117
if err := filepath .Walk (n , func (name string , info os.FileInfo , err error ) error {
118
+ if err != nil {
119
+ return err
120
+ }
121
+
117
122
if filepath .Ext (name ) == "." + ext {
118
123
n := strings .Replace (name , "." + ext , "" , - 1 )
119
124
names = append (names , n )
120
125
}
126
+
121
127
return nil
122
128
}); err != nil {
123
129
return nil , err
You can’t perform that action at this time.
0 commit comments