From 894f105786b5e61ba7ac481b73e16212a94d9bbe Mon Sep 17 00:00:00 2001 From: Glax Date: Fri, 7 Mar 2025 13:38:32 +0100 Subject: [PATCH] DownloadSingleChapter narrow down FileStream options --- API/Schema/Jobs/DownloadSingleChapterJob.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/API/Schema/Jobs/DownloadSingleChapterJob.cs b/API/Schema/Jobs/DownloadSingleChapterJob.cs index 8b92710..ed4d21b 100644 --- a/API/Schema/Jobs/DownloadSingleChapterJob.cs +++ b/API/Schema/Jobs/DownloadSingleChapterJob.cs @@ -78,7 +78,6 @@ public class DownloadSingleChapterJob(string chapterId, string? parentJobId = nu { if (!TrangaSettings.bwImages && TrangaSettings.compression == 100) return; - DateTime start = DateTime.UtcNow; using Image image = Image.Load(imagePath); File.Delete(imagePath); if(TrangaSettings.bwImages) @@ -127,7 +126,7 @@ public class DownloadSingleChapterJob(string chapterId, string? parentJobId = nu if (requestResult.result == Stream.Null) return false; - FileStream fs = new (savePath, FileMode.Create); + FileStream fs = new (savePath, FileMode.Create, FileAccess.Write, FileShare.None); requestResult.result.CopyTo(fs); fs.Close(); ProcessImage(savePath);