websperts / tinypng-cli

Handy command line tool for shrinking PNG images using the TinyPNG API
MIT License
242 stars 40 forks source link

Removed preceding current directory dot and slash #2

Closed josephsong closed 9 years ago

josephsong commented 9 years ago

For deep structures, the createReadStream method fails when presented with ./path/to/image.png but works with path/to/image.png. That reflects the example in the Node docs: http://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options

I came across this when trying to apply the (really great) tool recursively to my WordPress uploads directory, which is a few levels deep (eg. uploads/2015/01/image.png).