1
0
mirror of https://github.com/thebaer/cdr.git synced 2024-11-15 01:31:01 +00:00

Skip renaming tracks with errors

This commit is contained in:
Matt Baer 2020-02-29 11:19:04 -05:00
parent de090b9b8f
commit 001589772c

View File

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