Archived
1
0

Adds cleaning of MIDI files

This commit is contained in:
Jip J. Dekker 2016-10-02 02:47:20 +02:00
parent 6d32fe2c38
commit 38b72cf137

View File

@ -17,6 +17,7 @@ package compiler
import (
"os"
"path/filepath"
"strings"
log "github.com/Sirupsen/logrus"
"github.com/jjdekker/ponder/helpers"
@ -33,6 +34,10 @@ func Clean(path string, opts *settings.Settings) {
for i := range scores {
scores[i].GenerateOutputPath(opts)
helpers.CleanFile(scores[i].OutputPath)
dot := strings.LastIndex(scores[i].OutputPath, ".")
midi := scores[i].OutputPath[:dot+1] + "midi"
helpers.CleanFile(midi)
}
// Remove empty category directories