libostree: Ensure progress keys are all always set
If one of the progress keys is set in a pull operation, a ::changed signal is emitted on the progress object, and the callback for that could query any of the progress keys — so they all need to be set, otherwise we get an assertion failure in ostree_async_progress_get() due to a named key not existing. Spotted by Dan Nicholson in PR #819. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #835 Approved by: cgwalters
This commit is contained in:
parent
f1da7ec300
commit
bf9772f231
|
|
@ -3477,6 +3477,9 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
guint shift;
|
guint shift;
|
||||||
GString *buf = g_string_new ("");
|
GString *buf = g_string_new ("");
|
||||||
|
|
||||||
|
/* Ensure the rest of the progress keys are set appropriately. */
|
||||||
|
update_progress (pull_data);
|
||||||
|
|
||||||
if (bytes_transferred < 1024)
|
if (bytes_transferred < 1024)
|
||||||
shift = 1;
|
shift = 1;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue