Cleanup output stream
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user