From 395c801476724413d74d8fe841f64ea773cc6f3d Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sun, 19 May 2019 17:18:38 -0700 Subject: [PATCH] libsysprof-capture: save filename if first save --- src/libsysprof-capture/sysprof-capture-reader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libsysprof-capture/sysprof-capture-reader.c b/src/libsysprof-capture/sysprof-capture-reader.c index c22d3bbf..5f609e2e 100644 --- a/src/libsysprof-capture/sysprof-capture-reader.c +++ b/src/libsysprof-capture/sysprof-capture-reader.c @@ -898,6 +898,9 @@ sysprof_capture_reader_save_as (SysprofCaptureReader *self, to_write -= written; } + if (self->filename == NULL) + self->filename = g_strdup (filename); + close (fd); return TRUE;