[Ohrrpgce] SVN: james/7959 In escape_filename() don't escape parenthesis () since this was causing

Ralph Versteegen teeemcee at gmail.com
Wed Apr 27 04:28:38 PDT 2016


On 26 April 2016 at 07:30,  <subversion at hamsterrepublic.com> wrote:
> james
> 2016-04-25 12:30:14 -0700 (Mon, 25 Apr 2016)
> 346
> In escape_filename() don't escape parenthesis () since this was causing innosetup to break when called via wine
> in distribute_game_as_windows_installer() because of the parenthesis in "Program Files (x86)"
>
> (What was the reason for escaping parenthesis? DO I need to split off a special case function for escaping the innosetup command string?)
> ---
> U   wip/util.bas

I see I wrote escape_filename. I must have escaped () because those
characters aren't safe to use in bash without putting quotes around
the filename. All the other special characters are also escaped.
However escape_filename puts quotes around the returned filename, so
escaping all those characters is unnecessary, with the exception of $
\ ` and ".

Actually, it's much worse than that: escaping those other characters
doesn't work, because there are no such escape codes! For example |
gets escaped to \|, which ends up as \| in the filename. There's
nothing specific to invoking wine here; audio files containing those
characters also couldn't be converted to ogg and imported. I tried
opening an .rpg file with Custom in path containing '#' and while most
things worked, a few harmless chmod errors occurred like:
chmod: cannot access
'/mnt/common/ohrrpgce/spare-git/test\#/autobackups': No such file or
directory


More information about the Ohrrpgce mailing list