Skip to content

Commit

Permalink
Bugfix: Create mod folder if it doesnt exist (aeon0#701)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeon0 authored Apr 15, 2022
1 parent 68f3657 commit cc01544
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/utils/auto_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ def set_launch_settings(launch_options):
with open(f"{os.getenv('APPDATA')}/Battle.net/Battle.net.config", 'w') as outfile:
json.dump(curr_settings, outfile, indent=4)

def copy_mod_files():
new_path = f"{Config().general['d2r_path']}/mods/botty"
def copy_mod_files():
new_path = os.path.join(Config().general['d2r_path'], "mods\\botty")
if not os.path.exists(new_path):
os.makedirs(new_path)
try:
shutil.rmtree(new_path)
shutil.copytree("assets/mods/botty", new_path)
Expand Down Expand Up @@ -128,4 +130,4 @@ def check_settings() -> dict:
return diff_settings

if __name__ == "__main__":
adjust_settings()
copy_mod_files()

0 comments on commit cc01544

Please sign in to comment.