Skip to content

Commit 0e50726

Browse files
committed
Modpack overrides will now override old overrides, even if they were modified
1 parent e3e6438 commit 0e50726

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'maven-publish'
44
apply plugin: 'signing'
55

66
group 'fr.flowarg'
7-
version '1.8.2'
7+
version '1.8.3'
88
archivesBaseName = "flowupdater"
99

1010
java {

src/main/java/fr/flowarg/flowupdater/FlowUpdater.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
public class FlowUpdater
3737
{
3838
/** FlowUpdater's version string constant */
39-
public static final String FU_VERSION = "1.8.1";
39+
public static final String FU_VERSION = "1.8.3";
4040

4141
/** Vanilla version's object to update/install */
4242
private final VanillaVersion vanillaVersion;

src/main/java/fr/flowarg/flowupdater/integrations/curseforgeintegration/CurseForgeIntegration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class CurseForgeIntegration extends Integration
3434
private static final String CF_API_KEY = "JDJhJDEwJHBFZjhacXFwWE4zbVdtLm5aZ2pBMC5kdm9ibnhlV3hQZWZma2Q5ZEhCRWFid2VaUWh2cUtpJDJhJ";
3535
private static final String MOD_FILE_ENDPOINT = "/v1/mods/{modId}/files/{fileId}";
3636

37-
private boolean changed = false;
37+
private boolean manifestChanged = false;
3838

3939
/**
4040
* Default constructor of a basic Integration.
@@ -179,7 +179,7 @@ private void extractModPack(@NotNull Path out, boolean installExtFiles) throws E
179179
{
180180
if(Files.notExists(flPath) || entry.getCrc() != FileUtils.getCRC32(flPath))
181181
{
182-
this.changed = true;
182+
this.manifestChanged = true;
183183
this.transferAndClose(flPath, zipFile, entry);
184184
}
185185
continue;
@@ -188,7 +188,7 @@ private void extractModPack(@NotNull Path out, boolean installExtFiles) throws E
188188
if(entryName.equals("modlist.html"))
189189
continue;
190190

191-
if(!installExtFiles || Files.exists(flPath)) continue;
191+
if(!installExtFiles || (Files.exists(flPath) && entry.getCrc() == FileUtils.getCRC32(flPath))) continue;
192192

193193
if (flPath.getFileName().toString().endsWith(flPath.getFileSystem().getSeparator()))
194194
Files.createDirectories(flPath);
@@ -237,7 +237,7 @@ private void extractModPack(@NotNull Path out, boolean installExtFiles) throws E
237237

238238
String json = StringUtils.toString(Files.readAllLines(cachePath, StandardCharsets.UTF_8));
239239

240-
if(this.changed || json.contains("\"md5\"") || json.contains("\"length\""))
240+
if(this.manifestChanged || json.contains("\"md5\"") || json.contains("\"length\""))
241241
{
242242
Files.delete(cachePath);
243243
Files.createFile(cachePath);

0 commit comments

Comments
 (0)