From 1a2b8913cb0d29327c6488a30d3214994ed82f79 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 28 Dec 2017 22:10:59 -0800 Subject: No need to remove the old name after a save-with-move; it was, well, *moved*. Change-Id: Ic76eee870aff69b9daaf80d99fa619bf762258a1 Reviewed-on: https://code.wireshark.org/review/25058 Reviewed-by: Guy Harris (cherry picked from commit c791549a778aa34d83154b27fc9cd272e0d14881) Reviewed-on: https://code.wireshark.org/review/25061 --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.c') diff --git a/file.c b/file.c index 14470f3405..941e2f932e 100644 --- a/file.c +++ b/file.c @@ -4586,7 +4586,7 @@ cf_save_records(capture_file *cf, const char *fname, guint save_format, /* If this was a temporary file, and we didn't do the save by doing a move, so the tempoary file is still around under its old name, remove it. */ - if (cf->is_tempfile) { + if (cf->is_tempfile && how_to_save != SAVE_WITH_MOVE) { /* If this fails, there's not much we can do, so just ignore errors. */ ws_unlink(cf->filename); } -- cgit v1.2.3