Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/QuestCraft-5.1.0-OpenXR' into Qu…
Browse files Browse the repository at this point in the history
…estCraft-5.1.0-OpenXR
  • Loading branch information
The Judge committed Dec 18, 2024
2 parents 2e49082 + 6b196b7 commit 70afb12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/pojlib/util/download/DownloadManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void fileDownloadComplete(String fileName) {
private void getOverallProgress() {
int completed = completedFiles.get();
double overallProgress = ((double) completed / totalFiles) * 100;
if (completed == totalFiles) {API.currentDownload = "Finished! Ready to start.";}
if (completed == totalFiles) {API.currentDownload = "Finished! Ready to start."; API.finishedDownloading = true;}
API.downloadStatus = overallProgress;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/pojlib/util/download/DownloadUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.IOUtils;

import pojlib.API;
import pojlib.util.Logger;

import javax.net.ssl.SSLException;
Expand Down Expand Up @@ -43,6 +44,7 @@ private static void download(URL url, OutputStream os, String fileName, Download
}

public static void downloadFile(String url, File out, DownloadManager downloadManager) throws IOException {
API.finishedDownloading = false;
Objects.requireNonNull(out.getParentFile()).mkdirs();
File tempOut = File.createTempFile(out.getName(), ".part", out.getParentFile());
try {
Expand Down

0 comments on commit 70afb12

Please sign in to comment.