From 38b72cf137cc1ad7c01182b3abd23e92d44fa4d7 Mon Sep 17 00:00:00 2001 From: "Jip J. Dekker" Date: Sun, 2 Oct 2016 02:47:20 +0200 Subject: [PATCH] Adds cleaning of MIDI files --- compiler/clean.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/clean.go b/compiler/clean.go index 90e9e94..8ce710d 100644 --- a/compiler/clean.go +++ b/compiler/clean.go @@ -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