|
|
|
@ -294,12 +294,22 @@ namespace NzbDrone.Common.Disk
|
|
|
|
|
{
|
|
|
|
|
Ensure.That(path, () => path).IsValidPath();
|
|
|
|
|
|
|
|
|
|
if (dateTime.Before(DateTimeExtensions.Epoch))
|
|
|
|
|
{
|
|
|
|
|
dateTime = DateTimeExtensions.Epoch;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Directory.SetLastWriteTimeUtc(path, dateTime);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void FileSetLastWriteTime(string path, DateTime dateTime)
|
|
|
|
|
{
|
|
|
|
|
Ensure.That(path, () => path).IsValidPath();
|
|
|
|
|
|
|
|
|
|
if (dateTime.Before(DateTimeExtensions.Epoch))
|
|
|
|
|
{
|
|
|
|
|
dateTime = DateTimeExtensions.Epoch;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
File.SetLastWriteTime(path, dateTime);
|
|
|
|
|
}
|
|
|
|
|