Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions beets/dbcore/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def _get_formatted(self, model: Model, key: str) -> str:
sep_repl: str = beets.config["path_sep_replace"].as_str()
sep_drive: str = beets.config["drive_sep_replace"].as_str()

if re.match(r"^\w:", value):
value = re.sub(r"(?<=^\w):", sep_drive, value)
if re.match(r"^[a-zA-Z]:", value):
value = re.sub(r"(?<=[a-zA-Z]):", sep_drive, value)

for sep in (os.path.sep, os.path.altsep):
if sep:
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ Bug fixes
``duplicate_action`` config options were silently ignored for as-is imports.
- :doc:`/plugins/convert`: Fix extension substitution inside path of the
exported playlist.
- :ref:`replace`: Made ``drive_sep_replace`` regex logic more precise to prevent
edge-case mismatches (e.g., a song titled "1:00 AM" would incorrectly be
considered a Windows drive path).

For plugin developers
~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading