diff --git a/src/libsysprof/sysprof-document.c b/src/libsysprof/sysprof-document.c index 597fef5d..58e4bfcb 100644 --- a/src/libsysprof/sysprof-document.c +++ b/src/libsysprof/sysprof-document.c @@ -2755,6 +2755,7 @@ sysprof_document_save_async (SysprofDocument *self, { g_autoptr(GTask) task = NULL; g_autoptr(GBytes) bytes = NULL; + g_autofree char *basename = NULL; g_return_if_fail (SYSPROF_IS_DOCUMENT (self)); g_return_if_fail (G_IS_FILE (file)); @@ -2764,6 +2765,9 @@ sysprof_document_save_async (SysprofDocument *self, g_task_set_source_tag (task, sysprof_document_save_async); sysprof_document_mark_busy_for_task (self, task); + basename = g_file_get_basename (file); + _sysprof_document_set_title (self, basename); + bytes = g_mapped_file_get_bytes (self->mapped_file); g_file_replace_contents_bytes_async (file,