Browse Source

Skip renaming tracks with errors

Matt Baer 3 months ago
parent
commit
001589772c
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      cmd/cdr/clean.go

+ 3
- 0
cmd/cdr/clean.go View File

@@ -25,6 +25,9 @@ func cleanAction(c *cli.Context) error {
25 25
 		if !i.IsDir() && !strings.HasPrefix(i.Name(), ".") {
26 26
 			fName := i.Name()
27 27
 			trackName := cdr.RenameTrack(fName)
28
+			if trackName == "" {
29
+				return nil
30
+			}
28 31
 			fmt.Println("Renaming", fName, "to", trackName)
29 32
 			os.Rename(fName, trackName)
30 33
 		}