Skip to content

Commit

Permalink
Dont cache or upgrade mods when going from maven to asset file name a… (
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis authored Jan 12, 2025
1 parent 103c59b commit 57c8055
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/GTNHNightlyUpdater/Updater.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ void updateModpackMods(Assets.Asset assets, Path modCacheDir, Set<String> modExc
continue;
}

String newModFileName = modVersionToUse.filename();
if (packMods.containsKey(newModFileName.toLowerCase())) {
if (packMods.containsKey(modVersionToUse.filename().toLowerCase())) {
continue;
}
if (packMods.containsKey(modVersionToUse.mavenFilename().toLowerCase())) {
continue;
}

String newModFileName = modVersionToUse.filename();

String oldFileName = null;
// check for old nightly version
for (val version : mod.versions()) {
Expand Down Expand Up @@ -245,6 +249,10 @@ void cacheMods(Assets.Asset asset, Path modCacheDir) throws IOException, Interru
}
}

if (Files.exists(modCacheDir.resolve(modVersionToUse.filename())) || Files.exists(modCacheDir.resolve(modVersionToUse.mavenFilename()))) {
continue;
}

Path targetPath = modCacheDir.resolve(modVersionToUse.filename());

String downloadURL;
Expand Down

0 comments on commit 57c8055

Please sign in to comment.