Closed kousu closed 6 years ago
I think the bug is here:
value_list = shlex.split(value)
instruction_list = [substitute_placeholders(part, placeholders) for
part in value_list]
Doing the subsitutions after the parsing is backwards. You should substitute then let shlex
get at it so that it can properly parse anything that got substituted in. (by the way, thanks for using shlex! and your really good docs! and nice clean unixey design! it gives me a lot of good feelings using your code).
value_list = shlex.split(substitute_placeholders(value, placeholders))
Er, actually I tried that and it didn't affect instruction_list
. Both ways turned out the same.
The real issue, I think, is that my filesystem in question is exFAT and so it rejects '?' in filenames.
I set
and if
{title}
has spaces in it, like most do, I getI know there's
{filename_title}
(and using it does work) but I like having nice pretty unmangled titles. I even double-quoted the variables! They should be okay to pass through to a shell command.