Cleanup output stream

This commit is contained in:
Anuken
2023-06-23 22:51:53 -04:00
parent c66abc3f0f
commit 0e31103b21
2 changed files with 4 additions and 2 deletions

View File

@@ -621,7 +621,9 @@ public class ModsDialog extends BaseDialog{
long len = result.getContentLength(); long len = result.getContentLength();
Floatc cons = len <= 0 ? f -> {} : p -> modImportProgress = p; Floatc cons = len <= 0 ? f -> {} : p -> modImportProgress = p;
Streams.copyProgress(result.getResultAsStream(), file.write(false), len, 4096, cons); try(var stream = file.write(false)){
Streams.copyProgress(result.getResultAsStream(), stream, len, 4096, cons);
}
var mod = mods.importMod(file); var mod = mods.importMod(file);
mod.setRepo(repo); mod.setRepo(repo);

View File

@@ -25,4 +25,4 @@ org.gradle.caching=true
#used for slow jitpack builds; TODO see if this actually works #used for slow jitpack builds; TODO see if this actually works
org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000 org.gradle.internal.http.connectionTimeout=100000
archash=d143fbe44f archash=1a1af26c6a