Voxelum / x-minecraft-launcher

An Open Source Minecraft Launcher with Modern UX. Provide a Disk Efficient way to manage all your Mods!
https://xmcl.app/
MIT License
729 stars 105 forks source link

The launcher allows installing multiple mod jar files with the same name #760

Open 66BA9Q-ME49 opened 2 months ago

66BA9Q-ME49 commented 2 months ago

Is there an existing issue for this?

Launcher Version

0.46.1

Operating System

Windows

Architecture

x64

Current Behavior

If I install a mod using the bug described in #740, but this time selecting the same version both on Curseforge and Modrinth, it just adds a suffix after the jar file name.

Expected Behavior

The launcher shouldn't add a suffix to the new jar file if a file with the same name is already present in the mod folder. It should either replace the old file or deny the installation.

Steps To Reproduce

I tested it in MC 1.20.1 with forge 47.3.0, but it shouldn't matter.

  1. Install the latest version of GeckoLib (4.4.9) through Curseforge The mod is correctly installed as geckolib-forge-1.20.1-4.4.9.jar
  2. Install the same version of GeckoLib through Modrinth You now have 2 jar files for GeckoLib in the mod folder:
    • geckolib-forge-1.20.1-4.4.9.jar
    • geckolib-forge-1.20.1-4.4.9.jar.0c60e8.jar

Anything else?

image image

66BA9Q-ME49 commented 1 month ago

This bug keeps happening in 0.47.4, but now it adds an underscore before the file name... image

66BA9Q-ME49 commented 1 month ago

It seems to have been fixed, so I'll close this issue.

66BA9Q-ME49 commented 2 weeks ago

Reopening it because it happened again. I was updating a mod and I got a duplicated mod. image

The mod I was updating was from Curseforge, and I installed GeckoLib from Modrinth. I think the launcher shouldn't add a suffix when a file with the same name is already present in the mod folder. It should either do nothing or ask the user if he wants to replace the current installed file.