-
Notifications
You must be signed in to change notification settings - Fork 2.6k
add missing 'done' in write_request #472
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
Conversation
e0e9e58 to
7141adf
Compare
|
@ottigeda, thank you for your contribution! The code looks almost good to me. Could you handle the following two things? Then, I'll merge it. Thanks!
data_sink.is_writable = [&](void) {
return strm.is_writable() && written_length >= 0;
};
Lines 4138 to 4160 in ba685db
|
c9a90b3 to
28c07a1
Compare
|
Is it that, what you wanted to have in addition ? |
|
@ottigeda, thanks for the update. I have been pondering over this change, and came to remember that So instead of implementing This is a breaking change to the ContentProvider interface. But it's necessary for the API consistency. Sorry that I couldn't use your changes. But thank you very much for bringing this matter! |
|
No problem, your alternative solution is perfectly fine with me. Thanks a lot! |
DataSink::done was not assigned in write_request.
Therefore it was not possible to call "done" in an content provider.
I expected that should be the way to go, in case of failure to provide the content.
As an example, this could happen because the file to provide has vanished from disk in mean time.
I tried to implement it the same way as in other places, I hope it makes sense to you ?