Merge pull request #1279 from aromaa/fix/access-time-exception

This commit is contained in:
Adam Hathcock
2026-04-10 17:38:48 +01:00
committed by GitHub

View File

@@ -23,17 +23,38 @@ internal static class EntryExtensions
{
if (entry.CreatedTime.HasValue)
{
nf.CreationTime = entry.CreatedTime.Value;
try
{
nf.CreationTime = entry.CreatedTime.Value;
}
catch
{
// Invalid time or the OS rejected
}
}
if (entry.LastModifiedTime.HasValue)
{
nf.LastWriteTime = entry.LastModifiedTime.Value;
try
{
nf.LastWriteTime = entry.LastModifiedTime.Value;
}
catch
{
// Invalid time or the OS rejected
}
}
if (entry.LastAccessedTime.HasValue)
{
nf.LastAccessTime = entry.LastAccessedTime.Value;
try
{
nf.LastAccessTime = entry.LastAccessedTime.Value;
}
catch
{
// Invalid time or the OS rejected
}
}
}