Skip to content

Commit

Permalink
Fix 543 regression in wizards
Browse files Browse the repository at this point in the history
If a wizard creates an INI tweak, it would fail to apply.

Mopy/bash/bosh/bain.py:
Fix 543 regression in BAIN install

When BAIN tried to create a backup of an INI that will be overwritten,
the new_info call was passed a Path when it needed a string.
  • Loading branch information
Infernio committed Jul 23, 2022
1 parent a68ee0f commit 83b9049
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Mopy/bash/basher/installer_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ def _apply_tweaks(self, installer, ret, ui_refresh):
manuallyApply.append((outFile, iniFile))
continue
target_ini_file = bosh.BestIniFile(target_path)
if INIList.apply_tweaks((bosh.iniInfos[outFile.tail],),
if INIList.apply_tweaks((bosh.iniInfos[outFile.stail],),
target_ini_file):
lastApplied = outFile.tail
lastApplied = FName(outFile.stail)
#--Refresh after all the tweaks are applied
if lastApplied is not None:
target_updated = bosh.INIInfos.update_targets(new_targets)
Expand Down
2 changes: 1 addition & 1 deletion Mopy/bash/bosh/bain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2453,7 +2453,7 @@ def _editTweaks(tweaksCreated):
ini_.writelines(lines)
# We notify BAIN below, although highly improbable the created ini
# is included to a package
iniInfos.new_info(tweakPath.tail, notify_bain=True)
iniInfos.new_info(tweakPath.stail, notify_bain=True)
tweaksCreated -= removed

def __installer_install(self, installer, destFiles, index, progress,
Expand Down
3 changes: 2 additions & 1 deletion Mopy/bash/gui/list_ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def InsertListCtrlItem(self, index, value, item, decorate_cb):
"""Insert an item to the list control giving it an internal id.
:param decorate_cb: A callback that will be passed the created wx item.
Use this to set properties on the item once before it is """
Use this to set properties on the item once before it is inserted
into the ListCtrl via SetItem."""
i = self.__id(item)
new_index = self._native_widget.InsertItem(index, value)
if new_index == -1:
Expand Down

0 comments on commit 83b9049

Please sign in to comment.