Closed cosinekitty closed 9 years ago
By the way, I should say this is a wonderful piece of code. It is refreshing how easy it is to use and how it just WORKED the first time I used it, without having to fight to get it to compile. Thank you!
Thanks for this fix, good find
sorry for late merge I thought it already was long ago but apparently it wasn't :)
I'm glad I could make this small contribution. And I would have reminded you in another year or two! :)
On Sat, Sep 12, 2015 at 5:15 PM, Lode Vandevenne notifications@github.com wrote:
sorry for late merge I thought it already was long ago but apparently it wasn't :)
— Reply to this email directly or view it on GitHub https://github.com/lvandeve/lodepng/pull/14#issuecomment-139820395.
Before this change, encode() would return 0 whether or not the output file was created. There was no way for a caller to know when the file could not be created (e.g. due to a non-existent parent directory).
Changed save_file() to return error 79 if it cannot open output file. encode() checks return code from save_file() and passes any error value back to the caller.