Pad state dump block no. in filenames with zeroes

This commit is contained in:
Nick Savers 2014-08-27 11:08:53 +02:00
parent 5bf3329993
commit 69ba68adf4
1 changed files with 2 additions and 2 deletions

View File

@ -385,10 +385,10 @@ public class Repository {
String fileName = "";
if (txHash != null)
fileName = String.format("%d_%d_%s.dmp", block.getNumber(), txNumber,
fileName = String.format("%05d_%d_%s.dmp", block.getNumber(), txNumber,
Hex.toHexString(txHash).substring(0, 8));
else
fileName = String.format("%d_c.dmp", block.getNumber());
fileName = String.format("%05d_c.dmp", block.getNumber());
File dumpFile = new File(System.getProperty("user.dir") + "/" + dir + fileName);
FileWriter fw = null;