Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encode() returns error code if save_file() cannot open output file. #14

Merged
merged 1 commit into from
Sep 12, 2015
Merged

encode() returns error code if save_file() cannot open output file. #14

merged 1 commit into from
Sep 12, 2015

Conversation

cosinekitty
Copy link
Contributor

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.

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.
@cosinekitty
Copy link
Contributor Author

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!

@lvandeve
Copy link
Owner

lvandeve commented Aug 4, 2015

Thanks for this fix, good find

lvandeve added a commit that referenced this pull request Sep 12, 2015
encode() returns error code if save_file() cannot open output file.
@lvandeve lvandeve merged commit 10a41cc into lvandeve:master Sep 12, 2015
@lvandeve
Copy link
Owner

sorry for late merge I thought it already was long ago but apparently it wasn't :)

@cosinekitty
Copy link
Contributor Author

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
#14 (comment).

@Cvjark Cvjark mentioned this pull request May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants