echonest/echoprint-codegen — pull request #41 by alastair (2012-05-10 04:02:20+00:00)
Title: Quote filenames with single quotes on POSIX systems

This should fix #27 and maybe #25. On POSIX systems at least, quoting popen parameters with single quotes and replacing single quotes inside the filename with `"'\\''"` results in the filename being passed exactly. I've tested it with files named with backticks and single quotes. (http://stackoverflow.com/questions/1452501/string-replace-in-c)

Since most of the GetCommandLine method used std::string anyway, I moved from cstrings for easier find/replace.

Tested on OSX and Linux. Not tested on windows, but it shouldn't make things any worse off.