2
0

Fix CheckChapterIsDownloaded Directory does not exists exception returning 0 chapters

This commit is contained in:
glax 2023-06-25 23:56:22 +02:00
parent 4f01c1166f
commit 9ccba6fba6

View File

@ -187,7 +187,9 @@ public abstract class Connector
public bool CheckChapterIsDownloaded(Publication publication, Chapter chapter)
{
string newFilePath = GetArchiveFilePath(publication, chapter);
FileInfo[] archives = new DirectoryInfo(Path.Join(downloadLocation, publication.folderName)).GetFiles("*.cbz");
if (!Directory.Exists(Path.Join(downloadLocation, publication.folderName)))
return false;
FileInfo[] archives = new DirectoryInfo(Path.Join(downloadLocation, publication.folderName)).GetFiles();
Regex chapterRex = new(@"(Vol.[0-9]*)*Ch.[0-9]+");
if (File.Exists(newFilePath))