Skip to content

Commit

Permalink
fix crash when modpack already installed
Browse files Browse the repository at this point in the history
  • Loading branch information
cdbbnnyCode committed Feb 24, 2023
1 parent 35111a4 commit dd83180
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Modpack Installer
###### V2.3.1
###### V2.3.2

This command-line tool allows easy installation of CurseForge modpacks on Linux
systems. It installs each modpack in a semi-isolated environment, which prevents
Expand Down Expand Up @@ -121,6 +121,10 @@ This project is not endorsed by or affiliated with CurseForge, Overwolf, or Micr
All product and company names are the registered trademarks of their original owners.

### Changelog
#### v2.3.2 - 2023-02-24
* Fix crash in the datapack detection logic when the modpack data has already been successfully
installed.

#### v2.3.1 - 2023-02-07
* Detect included datapacks (i.e. for Repurposed Structures) and install them to
`.minecraft/datapacks`. Some modpacks will find datapacks at this location and will automatically
Expand Down
6 changes: 5 additions & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ def main(zipfile, user_mcdir=None, manual=False):
print("Unknown file type %s" % type)
sys.exit(1)

# Create success marker
else: # if mods already downloaded
# assume there might be datapacks if a datapacks directory exists
has_datapacks = os.path.isdir(mc_dir + '/datapacks'):

# Create success marker (does nothing if it already existed)
with open(mc_dir + '/.mod_success', 'wb') as f:
pass

Expand Down

2 comments on commit dd83180

@JacoBlack
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 231 should not end in colon?

@cdbbnnyCode
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Just amended the commit.

Please sign in to comment.