mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Ensure log creation times aren't from the future
yes, this is for real https://discord.com/channels/1099468797410283540/1106329163079614545/1133040760112021615
This commit is contained in:
parent
7b3eaa5a01
commit
b4bf2247c5
@ -75,7 +75,11 @@
|
|||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
logFileInfo = new DirectoryInfo(logDirectory).GetFiles().OrderByDescending(x => x.CreationTime).First();
|
logFileInfo = new DirectoryInfo(logDirectory)
|
||||||
|
.GetFiles()
|
||||||
|
.Where(x => x.CreationTime <= DateTime.Now)
|
||||||
|
.OrderByDescending(x => x.CreationTime)
|
||||||
|
.First();
|
||||||
|
|
||||||
if (logFileInfo.CreationTime.AddSeconds(15) > DateTime.Now)
|
if (logFileInfo.CreationTime.AddSeconds(15) > DateTime.Now)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user