Skip to content

Commit 7f07561

Browse files
committed
Fixed crash
1 parent 895b415 commit 7f07561

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

PatreonDownloader.Implementation/PatreonCrawledUrlProcessor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ public async Task<bool> ProcessCrawledUrl(ICrawledUrl udpCrawledUrl, string down
181181
}
182182
}
183183

184-
if (_patreonDownloaderSettings.UseSubDirectories)
184+
if (_patreonDownloaderSettings.UseSubDirectories &&
185+
crawledUrl.UrlType != PatreonCrawledUrlType.AvatarFile &&
186+
crawledUrl.UrlType != PatreonCrawledUrlType.CoverFile)
185187
downloadDirectory = Path.Combine(downloadDirectory, PostSubdirectoryHelper.CreateNameFromPattern(crawledUrl, _patreonDownloaderSettings.SubDirectoryPattern));
186188

187189
crawledUrl.DownloadPath = !skipChecks ? Path.Combine(downloadDirectory, filename) : downloadDirectory + Path.DirectorySeparatorChar;

0 commit comments

Comments
 (0)