Skip to content

Commit

Permalink
fix bug when create_single_release renames the directory
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Apr 29, 2024
1 parent 3863908 commit 836bac3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rose/releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import annotations

import dataclasses
import json
import logging
import re
Expand Down Expand Up @@ -534,7 +535,8 @@ def create_single_release(c: Config, track_path: Path) -> None:
af = AudioTags.from_file(new_track_path)
logger.info(f"Created phony single release {source_path.name}")
# Step 4: Update the cache!
update_cache_for_releases(c, [source_path])
c_tmp = dataclasses.replace(c, rename_source_files=False)
update_cache_for_releases(c_tmp, [source_path])
# Step 5: Default extracted singles to not new: if it is new, why are you meddling with it?
for f in source_path.iterdir():
if m := STORED_DATA_FILE_REGEX.match(f.name):
Expand Down

0 comments on commit 836bac3

Please sign in to comment.