Skip to content

Improve handling of renames, fix bugs #580

@Utumno

Description

@Utumno

Ghost of #259 - there are bugs:

308:

  • currently renaming multiple installers is broken:

      Traceback (most recent call last):
        File "bash\gui\events.py", line 165, in _post
      	result = listener(*listener_args)
        File "bash\basher\__init__.py", line 2421, in OnLabelEdited
      	name_new = self.new_name(newName)
        File "bash\basher\__init__.py", line 2448, in new_name
      	renaming_type = to_rename and type(self.data_store[to_rename[0]])
        File "bash\bolt.py", line 1125, in __getitem__
      	return self._data[key]
      KeyError: bolt.Path(u'lololi.7z.rar')
    

yep it's not there we just renamed it

  • screens have various glitches -> mostly fixed in 020404e
  • renaming bak files (a complex thing) must be implemented (a lot of ad hoc code, overrides etc) -> 5a985d8
    • _handle_left_down still checks for u'(autosave|quicksave)' -> acc5a05

310:

  • validation of user input needs much work: TODO commit -> 689bc48

model:

  • try_rename needs more work to chop off more overrides - and probably needs @conversation - mostly done in 0a69959 and finalized in 1ddf7a1
    • refresh code should be guarded for exceptions and have a base method that takes the output lists of try_rename - see 0a69959
    • especially screen info (so we move the GPath handling to the model) - see 1ddf7a1 and 098836b - still WIP but see comments in 098836b
  • (un)ghosting does not properly abort if the file we want to add the .ghost extension to is locked -> still valid?

.. but most importantly the model is half baked - the handling of the names (new name and co) belongs to the infos, handling of the messages to basher and so on - blocks #543 - renames are all about those keys (surprise!) and the handling should be centralized. For final comments and some ideas for a complete rename model see 098836b

That being said this is the final renames issue - we want to discourage people from renaming stuff (apart from installers) mods/saves names play a role and hence the monumental complexity of this code. So with this merge we forget about renames (no, no ini tweaks renames, thanks)

Metadata

Metadata

Assignees

Labels

A-bainArea: BAIN (BAsh INstallers, in bosh/bain.py)A-bsasArea: BSAs and BA2s (bosh/bsa_files.py)A-cosavesArea: Cosaves (xSE and Pluggy, in bosh/cosaves.py)A-inisArea: INIs (ini_files.py)A-savesArea: Saves (bosh/save_headers.py, bosh/_saves.py and partially bosh/faces.py)A-screenshotsArea: Screenshots (bosh.ScreenInfo(s), the Screenshots tab)C-bugCategory: Bug, an acknowledged defect in the programC-goalCategory: Long term goal. May be code-related or a meta goal.C-internalCategory: Keep track of internal refactoring. Implies the C-todo label except if it is a full C-goalM-relnotesMisc: Issue should be listed in the version history for its milestone

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions