aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-12-28 22:10:59 -0800
committerGuy Harris <guy@alum.mit.edu>2017-12-29 08:13:10 +0000
commit1a2b8913cb0d29327c6488a30d3214994ed82f79 (patch)
tree683169020fec041929cd2679ad5f9283f116aba2 /file.c
parente68fa50eac639d09fee0a24652c6ab5d3e7c505c (diff)
downloadwireshark-1a2b8913cb0d29327c6488a30d3214994ed82f79.tar.gz
wireshark-1a2b8913cb0d29327c6488a30d3214994ed82f79.tar.bz2
wireshark-1a2b8913cb0d29327c6488a30d3214994ed82f79.zip
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 <guy@alum.mit.edu> (cherry picked from commit c791549a778aa34d83154b27fc9cd272e0d14881) Reviewed-on: https://code.wireshark.org/review/25061
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
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);
}