musicfix

music file renamer and tagger
git clone git://git.2f30.org/musicfix.git
Log | Files | Refs | README | LICENSE

commit 56e1e7d653d3cf0a486124c65b4058791e00b99f
parent 2fa134eda1b91f679858f5a540d41cde7c004284
Author: lostd <lostd@2f30.org>
Date:   Tue Aug 14 11:46:47 +0000

Exit early if no music files in cwd

Diffstat:
bin/musicfix | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bin/musicfix b/bin/musicfix @@ -122,6 +122,10 @@ tracks = ARGV[1] || nil # Construct file list fl = Dir['*'].select {|f| File.extname(f).match /mp3|ogg|mpc|flac|wv/i}.sort +if fl.empty? then + puts 'No music files found!' + exit +end puts 'Files to process:' puts fl @@ -142,7 +146,6 @@ end # Sanity checks if tl.length != fl.length then puts "Found #{tl.length} tracks for #{fl.length} music files." - exit if fl.length == 0 if fl.length < tl.length then print "Use only the first #{fl.length} entries? [N/y] " else