liuliu / ccv

C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library
http://libccv.org
Other
7.08k stars 1.71k forks source link

Escape arguments coming from Ruby scripts #170

Open kylehowells opened 8 years ago

kylehowells commented 8 years ago

The Ruby scripts did not work for my when I was trying the face detection example. I was doing a few things wrong, but eventually I got it to work. But only with files that didn't have spaces in the file path.

This commit escapes all the arguments being executed by the ruby scripts. Among other issues (safety) this also allows you pass the scripts images with spaces in their file paths.

http://ruby-doc.org/stdlib-2.0.0/libdoc/shellwords/rdoc/Shellwords.html

kylehowells commented 7 years ago

Hi, this patch allows the ruby scripts to be used on file paths with spaces in them. If there's a problem please let me know and I'll try to correct them.

liuliu commented 7 years ago

Thank you. Will squash merge to unstable branch shortly after.