Commit d572b15c authored by Benjamin Winger's avatar Benjamin Winger

Fixed bug where config update fails when data directories don't already exist in config

parent d4a1e28d
Pipeline #48301161 canceled with stages
in 11 minutes and 58 seconds
......@@ -418,8 +418,8 @@ def install_mod(name, reinstall=False):
# Check if mod is already in config (prompt for re-install and new position)
for mod_install_dir in set().union(mod_install_dirs, [mod_dir_copy_path]):
results = remove_config_subdirs(config, "data", mod_install_dir)
index = min([index for (index, line) in results])
if len(results) > 0:
index = min([index for (index, line) in results])
if not reinstall and prompt_bool('Mod directory "{}" already exists in config file. Install to end of install order? (answering N leaves mod in original position, but will still update the data directories if changed)'.format(mod_name)):
reinstall = True
for directory in mod_install_dirs:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment