Commit b72c4666 authored by Allison Karlitskaya's avatar Allison Karlitskaya

measure_disk_usage: properly report results

In the async case, make sure we copy all of the out parameters from the
results structure, not just 'disk_usage'.
parent dbf95a5a
......@@ -7494,19 +7494,25 @@ g_file_real_measure_disk_usage_finish (GFile *file,
guint64 *num_files,
GError **error)
{
guint64 *reported_usage;
MeasureResult *measure_result;
g_return_val_if_fail (g_task_is_valid (result, file), FALSE);
reported_usage = g_task_propagate_pointer (G_TASK (result), error);
measure_result = g_task_propagate_pointer (G_TASK (result), error);
if (reported_usage == NULL)
if (measure_result == NULL)
return FALSE;
if (disk_usage)
*disk_usage = *reported_usage;
*disk_usage = measure_result->disk_usage;
g_free (reported_usage);
if (num_dirs)
*num_dirs = measure_result->num_dirs;
if (num_files)
*num_files = measure_result->num_files;
g_free (measure_result);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment