mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-16 10:50:43 +03:00
static-delta: Set error on bsdiff failure
bsdiff can fail when generating static deltas, particularly if not enough memory is available. Set error properly when this happens. https://bugzilla.gnome.org/show_bug.cgi?id=756260
This commit is contained in:
parent
f2b4a9e107
commit
60e5529ba0
@ -829,8 +829,10 @@ process_one_bsdiff (OstreeRepo *repo,
|
||||
op.cancellable = cancellable;
|
||||
op.error = error;
|
||||
stream.opaque = &op;
|
||||
if (bsdiff (tmp_from_buf, tmp_from_len, tmp_to_buf, tmp_to_len, &stream) < 0)
|
||||
if (bsdiff (tmp_from_buf, tmp_from_len, tmp_to_buf, tmp_to_len, &stream) < 0) {
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "bsdiff generation failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
payload = g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (out));
|
||||
payload_size = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (out));
|
||||
|
Loading…
x
Reference in New Issue
Block a user