Skip to content

Commit

Permalink
fix: clean up pack.mcmeta when deleting overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Oct 9, 2023
1 parent cbef428 commit f23fdd3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions beet/library/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,12 @@ def __delitem__(self, key: str):
for i, entry in enumerate(entries):
if entry.get("directory") == key:
del entries[i]
if not entries:
del overlays["entries"]
if not overlays:
del self.pack.mcmeta.data["overlays"]
break


def missing(self, key: str) -> PackType:
if self.pack is None:
Expand Down

0 comments on commit f23fdd3

Please sign in to comment.