From 3a54997d42a3c72f48b29af02de670e0c4eb58e3 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 14 Jan 2023 23:31:31 -0800 Subject: [PATCH] Fix corner case in rapid scans --- Test/Printer.cs | 4 ++-- Test/Protector.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Test/Printer.cs b/Test/Printer.cs index 96280d33..55da7e75 100644 --- a/Test/Printer.cs +++ b/Test/Printer.cs @@ -263,7 +263,7 @@ namespace Test Console.WriteLine(serializedData); // Write the output data - using (var sw = new StreamWriter(File.OpenWrite($"info-{DateTime.Now:yyyy-MM-dd_HHmmss}.json"))) + using (var sw = new StreamWriter(File.OpenWrite($"info-{DateTime.Now:yyyy-MM-dd_HHmmss.ffff}.json"))) { sw.WriteLine(serializedData); } @@ -277,7 +277,7 @@ namespace Test Console.WriteLine(builder); // Write the output data - using (var sw = new StreamWriter(File.OpenWrite($"info-{DateTime.Now:yyyy-MM-dd_HHmmss}.txt"))) + using (var sw = new StreamWriter(File.OpenWrite($"info-{DateTime.Now:yyyy-MM-dd_HHmmss.ffff}.txt"))) { sw.WriteLine(builder.ToString()); } diff --git a/Test/Protector.cs b/Test/Protector.cs index 59c66536..cd0e5ba0 100644 --- a/Test/Protector.cs +++ b/Test/Protector.cs @@ -29,7 +29,7 @@ namespace Test } catch (Exception ex) { - using (StreamWriter sw = new StreamWriter(File.OpenWrite($"exception-{DateTime.Now:yyyy-MM-dd_HHmmss}.txt"))) + using (StreamWriter sw = new StreamWriter(File.OpenWrite($"exception-{DateTime.Now:yyyy-MM-dd_HHmmss.ffff}.txt"))) { sw.WriteLine(ex); } @@ -49,7 +49,7 @@ namespace Test return; } - using (var sw = new StreamWriter(File.OpenWrite($"protection-{DateTime.Now:yyyy-MM-dd_HHmmss}.txt"))) + using (var sw = new StreamWriter(File.OpenWrite($"protection-{DateTime.Now:yyyy-MM-dd_HHmmss.ffff}.txt"))) { foreach (string key in protections.Keys.OrderBy(k => k)) {