Wrap the creation time setting

This commit is contained in:
Matt Nadareski
2024-07-18 00:00:23 -04:00
parent 0b84b85ba8
commit ccc4259220

View File

@@ -379,8 +379,13 @@ namespace SabreTools.FileTypes
outputStream.Dispose();
if (!string.IsNullOrEmpty(baseFile.Date))
File.SetCreationTime(fileName, DateTime.Parse(baseFile.Date));
// Try to set the creation time
try
{
if (!string.IsNullOrEmpty(baseFile.Date))
File.SetCreationTime(fileName, DateTime.Parse(baseFile.Date));
}
catch { }
return true;
}