From d9db8984a67a969021899cd303680bfdbe5014c1 Mon Sep 17 00:00:00 2001 From: epg <> Date: Tue, 31 Aug 2004 04:27:40 +0000 Subject: [PATCH] (flac): Copy filename sanitization from flac2mp3. --- fa-flacd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fa-flacd b/fa-flacd index c3413e5..e2a2b21 100755 --- a/fa-flacd +++ b/fa-flacd @@ -70,6 +70,7 @@ sub flac { my $artist; my $album; my @tags; + my $outfile; my $status; verbose("Renaming $dir/tags\n"); @@ -84,8 +85,16 @@ sub flac { verbose("chdir($dir)\n"); chdir($dir) or die("chdir($dir): $!"); + $outfile = "$album.flac-tmp"; + for ($outfile) { + s/\//_/g; + s/:/_/g; + s/'/_/g; + s/"/_/g; + } + verbose("Running flac\n"); - $status = system('flac', '-o', "../$artist/$album.flac-tmp", + $status = system('flac', '-o', "../$artist/$outfile", '--delete-input-file', '-V', '--cuesheet', 'cue', '--no-padding', '--best', map({ ('-T', $_) } @tags), -- 2.48.1