X-Git-Url: https://diplodocus.org/git/flac-archive/blobdiff_plain/914a40ceff9f0035e59993e04c3b123d71170c57..2ad4f7ba7b34e3bbbdf4f1e1de18810d92cebd4b:/flac2mp3 diff --git a/flac2mp3 b/flac2mp3 index e4eaa22..b2fc719 100755 --- a/flac2mp3 +++ b/flac2mp3 @@ -88,6 +88,8 @@ def flac2mp3(fn, title, artist, album_artist, album, discnum, date, verbose and tmp.append('--verbose') lame_options = ' '.join(tmp) + unquoted_fn = fn + # Escape any single quotes ' so we can quote this. (fn, title, artist, album_artist, album, date) = [(x or '').replace("'", r"'\''") @@ -112,7 +114,8 @@ def flac2mp3(fn, title, artist, album_artist, album, discnum, date, pic_options = '' (fd, picfn) = tempfile.mkstemp() os.close(fd) - p = Popen(['metaflac', '--export-picture-to', picfn, fn], stderr=PIPE) + p = Popen(['metaflac', '--export-picture-to', picfn, unquoted_fn], + stderr=PIPE) status = p.wait() stderr = ''.join(p.stderr) # Hacky check for flac with no album art