Skip to content

Commit

Permalink
Merge pull request #2629 from snappizz/topic/temp-synthdefs
Browse files Browse the repository at this point in the history
class lib: don't post "cleaning up temp synthdefs" if no SynthDefs are being cleaned up
  • Loading branch information
telephon authored Jan 12, 2017
2 parents 72b1965 + 91fa8bd commit fddb90d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions SCClassLibrary/Common/Audio/SystemSynthDefs.sc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ SystemSynthDefs {

// clean up any written synthdefs starting with "temp__"
var path = SynthDef.synthDefDir ++ tempNamePrefix ++ "*";
"Cleaning up temp synthdefs...".postln;
pathMatch(path).do { |file| File.delete(file) };
var match = pathMatch(path);
if(match.notEmpty) {
"Cleaning up % temporary SynthDef%...\n".postf(
match.size,
if(match.size == 1, { "" }, { "s" })
);
match.do { |file| File.delete(file) };
};

// add system synth defs
(1..numChannels).do { arg i;
Expand Down

0 comments on commit fddb90d

Please sign in to comment.