Fix some disposable patterns

This commit is contained in:
JustArchi
2020-04-18 14:08:37 +02:00
parent b5ae8eafba
commit 63c8a6540e
8 changed files with 25 additions and 19 deletions

View File

@@ -259,7 +259,8 @@ namespace ArchiSteamFarm {
}
try {
using ZipArchive zipArchive = new ZipArchive(new MemoryStream(response.Content));
using MemoryStream memoryStream = new MemoryStream(response.Content);
using ZipArchive zipArchive = new ZipArchive(memoryStream);
if (!UpdateFromArchive(zipArchive, SharedInfo.HomeDirectory)) {
ArchiLogger.LogGenericError(Strings.WarningFailed);