[sysprof/wip/chergert/sysprof-3] libsysprof-capture: save filename if first save



commit e93140ec550716de67e90e48b4ef70c607ad54dd
Author: Christian Hergert <chergert redhat com>
Date:   Sun May 19 17:18:38 2019 -0700

    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 c22d3bb..5f609e2 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]