aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2019-02-24 14:08:03 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2019-02-24 14:10:24 +0000
commitb3f6dbbb5bcce3dd7f16df0b38e96700c4a9377f (patch)
tree6e74e54e559a74b1a87b2d3e45d651c00ce7121c
parent0fcf4b1de93f79cc7d24ecb9c57193a61f822329 (diff)
Qt: Remove save_file when restart
Throw away the old temporary filename when restart capture to create a new temporary file. This was omitted from the previous restart capture fix. Change-Id: I39396d26563ec3d424161f81667864440a13e6d2 Reviewed-on: https://code.wireshark.org/review/32184 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r--ui/capture.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/capture.c b/ui/capture.c
index 0ecebde116..bf248fd4b2 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -726,6 +726,12 @@ capture_input_closed(capture_session *cap_session, gchar *msg)
g_free(capture_opts->save_file);
capture_opts->save_file = g_strdup(capture_opts->orig_save_file);
}
+
+ /* If it was a tempfile, throw away the old filename (so it will become a tempfile again) */
+ if (cf_is_tempfile((capture_file *)cap_session->cf)) {
+ g_free(capture_opts->save_file);
+ capture_opts->save_file = NULL;
+ }
} else {
/* We're not doing a capture any more, so we don't have a save file. */
g_free(capture_opts->save_file);