From 46d0bf4a11e037f275ff764935f28b6a145e01f4 Mon Sep 17 00:00:00 2001 From: bpatterson971 Date: Tue, 21 Oct 2014 16:21:00 -0700 Subject: [PATCH] Update convert.py crudely fix quoting in windows --- beetsplug/convert.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/beetsplug/convert.py b/beetsplug/convert.py index 90def8400e..83e263a8ca 100644 --- a/beetsplug/convert.py +++ b/beetsplug/convert.py @@ -94,10 +94,16 @@ def encode(command, source, dest, pretend=False): if not quiet and not pretend: log.info(u'Encoding {0}'.format(util.displayable_path(source))) - command = Template(command).safe_substitute({ - 'source': pipes.quote(source), - 'dest': pipes.quote(dest), - }) + if os.name == 'nt': + command = Template(command).safe_substitute({ + 'source': '"' + source + '"', + 'dest': '"' + dest + '"', + }) + else: + command = Template(command).safe_substitute({ + 'source': pipes.quote(source), + 'dest': pipes.quote(dest), + }) log.debug(u'convert: executing: {0}' .format(util.displayable_path(command)))