mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 14:55:20 -07:00
parent
c1a5e8e759
commit
2139246c4a
1 changed files with 14 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -79,8 +79,10 @@ namespace NzbDrone.Core.MediaFiles
|
|||
|
||||
private bool ChangeFileDate(string filePath, DateTime date)
|
||||
{
|
||||
DateTime oldDateTime = _diskProvider.FileGetLastWrite(filePath);
|
||||
DateTime oldDateTime;
|
||||
|
||||
if (DateTime.TryParse(_diskProvider.FileGetLastWrite(filePath).ToLongDateString(), out oldDateTime))
|
||||
{
|
||||
if (!DateTime.Equals(date, oldDateTime))
|
||||
{
|
||||
try
|
||||
|
@ -96,6 +98,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||
_logger.Warn(ex, "Unable to set date of file [" + filePath + "]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue