Skip to content

Commit

Permalink
Fix 'collisions' command sometimes failing to display
Browse files Browse the repository at this point in the history
File collisions weren't checked against the mod's install dir.

Imagine if you had two mods. One had a Data folder and its files were
installed into the game's root. Another mod didn't have a Data folder
but it would be installed into the game's Data folder.

If you had file conflicts within these mods, the mods would be flagged
as conflicting, but the file collisions wouldn't be displayed by the
collisions command.

This patch fixes that bug.
  • Loading branch information
cyberrumor committed Mar 11, 2024
1 parent 232197c commit abbf0b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ammo/mod_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,8 @@ def get_relative_files(mod):
else:
corrected_name = str(src).split(mod.name, 1)[-1].strip("/")

if mod.install_dir.name == mod.game_data.name:
corrected_name = mod.game_data.name + f"/{corrected_name}"
yield corrected_name

enabled_mods = [i for i in self.mods if i.enabled and i.conflict]
Expand Down

0 comments on commit abbf0b8

Please sign in to comment.