robinluckey/ohcount — pull request #7 by robinluckey (2011-12-21 17:51:12+00:00)
Title: OTWO-1137 Escapes single quotes in file paths

Ohcount uses the `file` command line utility to recognize some types of files.

If the path includes a single quote, trouble follows. For example if the path is `hello.c' ; rm -rf ~`, then we issue this command:

`file 'hello.c' ; rm -rf ~`

...which is a horrible situation.

This patch escapes single quotes in paths so that this will not happen.