Skip to content

Commit

Permalink
Fix old tag paths not properly getting disposed during save_tag_as (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShellyHerself committed Mar 8, 2020
2 parents 7ff2e4e + bbea090 commit 0bf0b1e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

This project also inherits changes from [Binilla](https://github.com/Sigmmma/binilla).

## [Unreleased]
## [1.9.1]
### Changed
- Fix missing license in distributions.
- Fix old tag paths not properly getting disposed during save_as events. (This bug made it so that you couldn't reopen a tag right after having opened and saved it to different file using save_as)

## [1.9.0]
### Added
Expand Down
4 changes: 2 additions & 2 deletions mozzarilla/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# ##############
__author__ = "Devin Bobadilla, Michelle van der Graaf"
# YYYY.MM.DD
__date__ = "2020.02.29"
__version__ = (1, 9, 0)
__date__ = "2020.03.07"
__version__ = (1, 9, 1)
__website__ = "https://github.com/Sigmmma/mozzarilla"
6 changes: 6 additions & 0 deletions mozzarilla/app_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,8 @@ def save_tag_as(self, tag=None, filepath=None):
return
tag = self.selected_tag

old_filepath = tag.filepath

if not hasattr(tag, "serialize"):
return

Expand Down Expand Up @@ -962,6 +964,10 @@ def save_tag_as(self, tag=None, filepath=None):
print(format_exc())
raise IOError("Could not save: %s" % filepath)

if old_filepath != filepath:
tag.handler.delete_tag(filepath=old_filepath)
tag.filepath = filepath

self.update_tag_window_title(w)
return tag

Expand Down

0 comments on commit 0bf0b1e

Please sign in to comment.