mirror of
https://github.com/Readarr/Readarr
synced 2026-02-12 17:53:26 +01:00
Fixed: Error checking if files should be deleted after import won't leave import in limbo
(cherry picked from commit 88ad6f9544110a2e825ebe6b2cde17e9f05475cc) Closes #824
This commit is contained in:
parent
0572d1ac80
commit
50be87e5a4
1 changed files with 8 additions and 1 deletions
|
|
@ -115,7 +115,9 @@ public bool ShouldDeleteFolder(IDirectoryInfo directoryInfo)
|
|||
try
|
||||
{
|
||||
var bookFiles = _diskScanService.GetBookFiles(directoryInfo.FullName);
|
||||
var rarFiles = _diskProvider.GetFiles(directoryInfo.FullName, true).Where(f => Path.GetExtension(f).Equals(".rar", StringComparison.OrdinalIgnoreCase));
|
||||
var rarFiles = _diskProvider.GetFiles(directoryInfo.FullName, true).Where(f =>
|
||||
Path.GetExtension(f).Equals(".rar",
|
||||
StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
foreach (var bookFile in bookFiles)
|
||||
{
|
||||
|
|
@ -144,6 +146,11 @@ public bool ShouldDeleteFolder(IDirectoryInfo directoryInfo)
|
|||
_logger.Debug(e, "Folder {0} has already been removed", directoryInfo.FullName);
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.Debug(e, "Unable to determine whether folder {0} should be removed", directoryInfo.FullName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private List<ImportResult> ProcessFolder(IDirectoryInfo directoryInfo, ImportMode importMode, DownloadClientItem downloadClientItem)
|
||||
|
|
|
|||
Loading…
Reference in a new issue