Skip to content

Commit 13ba5ab

Browse files
committed
fix: Merge conflicts
2 parents 398669f + a01b7e7 commit 13ba5ab

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/build_publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: build_publish
22
on:
3+
workflow_dispatch:
34
pull_request:
45
push:
56
paths:

common/src/main/java/de/rafael/modflared/binary/download/DownloadedCloudflared.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,21 @@ public CompletableFuture<Pair<Boolean, String>> isUptoDate() {
125125
for (int i = 0; i < 4; i++) {
126126
Modflared.LOGGER.info("Downloading cloudflared version {} from github. Attempt: {}", version, i + 1);
127127
var downloadedFile = syncDownloadFile();
128-
Modflared.LOGGER.info("Downloaded file preparing cloudflared binary...");
129128
var file = new File(TunnelManager.DATA_FOLDER, download.fileName());
130-
prepareFile(downloadedFile, file);
131-
132129
// Check if file is corrupt
133130
Modflared.LOGGER.info("Checking file integrity");
134-
var provided = GithubAPI.FileHash.computeHash(file);
131+
var provided = GithubAPI.FileHash.computeHash(downloadedFile);
135132
if(expected.compareTo(provided)) {
136133
Modflared.LOGGER.info("Download finished of cloudflared version {}!", version);
134+
Modflared.LOGGER.info("Downloaded file preparing cloudflared binary...");
135+
prepareFile(downloadedFile, file);
137136
return;
138137
} else {
139138
Modflared.LOGGER.warn("This downloaded file does not match with the file hash provided on GitHub.");
140139
Modflared.LOGGER.warn("Expected {}, Provided: {}", expected.hash(), provided.hash());
141-
142-
file.delete();
140+
downloadedFile.delete();
143141
}
142+
144143
}
145144
} catch (InterruptedException exception) {
146145
throw new IllegalStateException("Error while unpacking MacOS cloudflared download", exception);

0 commit comments

Comments
 (0)