diff --git a/TwitchDownloaderCore/ChatDownloader.cs b/TwitchDownloaderCore/ChatDownloader.cs index 657c3932..d560654a 100644 --- a/TwitchDownloaderCore/ChatDownloader.cs +++ b/TwitchDownloaderCore/ChatDownloader.cs @@ -270,6 +270,7 @@ public async Task DownloadAsync(CancellationToken cancellationToken) { try { + await outputFs.DisposeAsync(); outputFileInfo.Delete(); } catch { } diff --git a/TwitchDownloaderCore/ChatRenderer.cs b/TwitchDownloaderCore/ChatRenderer.cs index 293ceee2..c0ec4ab8 100644 --- a/TwitchDownloaderCore/ChatRenderer.cs +++ b/TwitchDownloaderCore/ChatRenderer.cs @@ -92,6 +92,7 @@ public async Task RenderVideoAsync(CancellationToken cancellationToken) { try { + await outputFs.DisposeAsync(); outputFileInfo.Delete(); } catch { } @@ -104,6 +105,7 @@ public async Task RenderVideoAsync(CancellationToken cancellationToken) { try { + await maskFs.DisposeAsync(); maskFileInfo.Delete(); } catch { } diff --git a/TwitchDownloaderCore/ChatUpdater.cs b/TwitchDownloaderCore/ChatUpdater.cs index 5370ea48..8cf753e8 100644 --- a/TwitchDownloaderCore/ChatUpdater.cs +++ b/TwitchDownloaderCore/ChatUpdater.cs @@ -51,6 +51,7 @@ public async Task UpdateAsync(CancellationToken cancellationToken) { try { + await outputFs.DisposeAsync(); outputFileInfo.Delete(); } catch { } diff --git a/TwitchDownloaderCore/ClipDownloader.cs b/TwitchDownloaderCore/ClipDownloader.cs index 5d14ad49..4ea6393d 100644 --- a/TwitchDownloaderCore/ClipDownloader.cs +++ b/TwitchDownloaderCore/ClipDownloader.cs @@ -50,6 +50,7 @@ public async Task DownloadAsync(CancellationToken cancellationToken) { try { + await outputFs.DisposeAsync(); outputFileInfo.Delete(); } catch { } diff --git a/TwitchDownloaderCore/TsMerger.cs b/TwitchDownloaderCore/TsMerger.cs index b53295ff..e913f1bc 100644 --- a/TwitchDownloaderCore/TsMerger.cs +++ b/TwitchDownloaderCore/TsMerger.cs @@ -45,6 +45,7 @@ public async Task MergeAsync(CancellationToken cancellationToken) { try { + await outputFs.DisposeAsync(); outputFileInfo.Delete(); } catch { } diff --git a/TwitchDownloaderCore/VideoDownloader.cs b/TwitchDownloaderCore/VideoDownloader.cs index d340ea35..08b1a62e 100644 --- a/TwitchDownloaderCore/VideoDownloader.cs +++ b/TwitchDownloaderCore/VideoDownloader.cs @@ -58,6 +58,7 @@ public async Task DownloadAsync(CancellationToken cancellationToken) { try { + await outputFs.DisposeAsync(); outputFileInfo.Delete(); } catch { }