mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Don't set folder write time on Mono
This commit is contained in:
parent
f657afc424
commit
c11c2c831d
@ -130,15 +130,13 @@ private EpisodeFile TransferFile(EpisodeFile episodeFile, Series series, List<Ep
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_logger.Debug("Setting last write time on series folder: {0}", series.Path);
|
SetFolderLastWriteTime(series.Path, episodeFile.DateAdded);
|
||||||
_diskProvider.FolderSetLastWriteTimeUtc(series.Path, episodeFile.DateAdded);
|
|
||||||
|
|
||||||
if (series.SeasonFolder)
|
if (series.SeasonFolder)
|
||||||
{
|
{
|
||||||
var seasonFolder = Path.GetDirectoryName(destinationFilename);
|
var seasonFolder = Path.GetDirectoryName(destinationFilename);
|
||||||
|
|
||||||
_logger.Debug("Setting last write time on season folder: {0}", seasonFolder);
|
SetFolderLastWriteTime(seasonFolder, episodeFile.DateAdded);
|
||||||
_diskProvider.FolderSetLastWriteTimeUtc(seasonFolder, episodeFile.DateAdded);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,5 +200,13 @@ private void SetFolderPermissions(string path)
|
|||||||
{
|
{
|
||||||
SetPermissions(path, _configService.FolderChmod);
|
SetPermissions(path, _configService.FolderChmod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetFolderLastWriteTime(String path, DateTime time)
|
||||||
|
{
|
||||||
|
if (OsInfo.IsMono) return;
|
||||||
|
|
||||||
|
_logger.Debug("Setting last write time on series folder: {0}", path);
|
||||||
|
_diskProvider.FolderSetLastWriteTimeUtc(path, time);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user