File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
kadai1/tanaka0325/imgconv Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,8 @@ func Run(options Options, args Args) error {
1616 return err
1717 }
1818
19- // get target image paths from args
20- udns := args .uniq ()
21- paths , err := getPaths (udns , * options .From )
19+ // get target image flepaths from args
20+ paths , err := getTargetFilePaths (args , * options .From )
2221 if err != nil {
2322 return err
2423 }
@@ -45,11 +44,12 @@ func Run(options Options, args Args) error {
4544 return nil
4645}
4746
48- func getPaths (dns []string , from string ) ([]string , error ) {
47+ func getTargetFilePaths (args Args , from string ) ([]string , error ) {
48+ uns := args .uniq ()
4949 paths := []string {}
5050
51- for _ , dn := range dns {
52- if err := filepath .Walk (dn , func (path string , info os.FileInfo , err error ) error {
51+ for _ , n := range uns {
52+ if err := filepath .Walk (n , func (path string , info os.FileInfo , err error ) error {
5353 if filepath .Ext (path ) == "." + from {
5454 paths = append (paths , path )
5555 }
You can’t perform that action at this time.
0 commit comments