Skip to content

Commit

Permalink
Adjust temporary files (#5280)
Browse files Browse the repository at this point in the history
Rigth now it creates something like:
```
.../Perota Chingo/Un viajecito/.12 Rie Chinito.flac64u8gm5u.beets
```
where no separatio between temp name and file extention, and it makes
quite hard to read it.

So, this changes adjust name to
```
.../Perota Chingo/Un viajecito/.12 Rie Chinito.flac.64u8gm5u.beets
```

This was one of forgotten fixup from
8d50301
  • Loading branch information
Serene-Arc authored Jun 3, 2024
2 parents e999987 + d8ea474 commit d4ecd5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion beets/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def move(path: bytes, dest: bytes, replace: bool = False):
dirname = os.path.dirname(bytestring_path(dest))
tmp = tempfile.NamedTemporaryFile(
suffix=syspath(b".beets", prefix=False),
prefix=syspath(b"." + basename, prefix=False),
prefix=syspath(b"." + basename + b".", prefix=False),
dir=syspath(dirname),
delete=False,
)
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Changelog

Changelog goes here! Please add your entry to the bottom of one of the lists below!

Bug fixes:

* Improved naming of temporary files by separating the random part with the file extension.

2.0.0 (May 30, 2024)
--------------------
Expand Down

0 comments on commit d4ecd5f

Please sign in to comment.