mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Fixed: CDH erroneously reported a locked file on import.
This commit is contained in:
parent
0ae0bd43be
commit
94311bda1f
@ -100,15 +100,18 @@ public List<ImportResult> ProcessFolder(DirectoryInfo directoryInfo, DownloadCli
|
|||||||
|
|
||||||
var videoFiles = _diskScanService.GetVideoFiles(directoryInfo.FullName);
|
var videoFiles = _diskScanService.GetVideoFiles(directoryInfo.FullName);
|
||||||
|
|
||||||
foreach (var videoFile in videoFiles)
|
if (downloadClientItem == null)
|
||||||
{
|
{
|
||||||
if (_diskProvider.IsFileLocked(videoFile))
|
foreach (var videoFile in videoFiles)
|
||||||
{
|
{
|
||||||
_logger.Debug("[{0}] is currently locked by another process, skipping", videoFile);
|
if (_diskProvider.IsFileLocked(videoFile))
|
||||||
return new List<ImportResult>
|
|
||||||
{
|
{
|
||||||
new ImportResult(new ImportDecision(new LocalEpisode { Path = videoFile }, "Locked file, try again later"), "Locked file, try again later")
|
_logger.Debug("[{0}] is currently locked by another process, skipping", videoFile);
|
||||||
};
|
return new List<ImportResult>
|
||||||
|
{
|
||||||
|
new ImportResult(new ImportDecision(new LocalEpisode { Path = videoFile }, "Locked file, try again later"), "Locked file, try again later")
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user