From e61c9f0789a5f01b18423a6fa3f9f30dbacc28b9 Mon Sep 17 00:00:00 2001 From: garciay Date: Tue, 11 Oct 2016 10:21:42 +0000 Subject: [PATCH] Enhance file rename operation to preserve file extension --- tools/pcapdump/src/org/etsi/its/pcapdump/pcapdump.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pcapdump/src/org/etsi/its/pcapdump/pcapdump.java b/tools/pcapdump/src/org/etsi/its/pcapdump/pcapdump.java index d679f2f77..ade5014cc 100644 --- a/tools/pcapdump/src/org/etsi/its/pcapdump/pcapdump.java +++ b/tools/pcapdump/src/org/etsi/its/pcapdump/pcapdump.java @@ -71,7 +71,7 @@ public class pcapdump implements ILayer { // Check if the file exist, never remove or scratch files File file = new File(FileName); if (file.exists()) { - File newFile = new File(FileName + "_" + System.currentTimeMillis()); + File newFile = new File(FileName.replace(".", String.format("_%d.", System.currentTimeMillis()))); file.renameTo(newFile); } -- GitLab