diff options
author | Wolfgang Müller | 2022-02-28 20:11:36 +0100 |
---|---|---|
committer | Wolfgang Müller | 2022-02-28 20:11:36 +0100 |
commit | 0b5d33ba3b0664f298b175cb0a2efd99ed54c942 (patch) | |
tree | 93bd79f8a8aecb40b26b8ebc7d400863545e56f3 /README.md | |
parent | dc021d5e05145c2e25bf0334032ff1c2054cf2ce (diff) | |
download | beets-oriole-0b5d33ba3b0664f298b175cb0a2efd99ed54c942.tar.gz |
extras: Decode paths before handing them to shutil.move0.1.0
Even though the python 3.9 documentation for shutil.move [1] states that
"[..] a path-like object for both src and dst" is accepted, it does not
in fact support bytes as arguments. This is because shutil.move calls
_dstinsrc [2] which tries to compare bytes with str via str.endswith.
Python seems to be aware of this [3], but has not yet fixed any of these
problems. For now just decode both bytes objects so shutil.move works.
[1] https://docs.python.org/3.9/library/shutil.html?highlight=shutil%20move#shutil.move
[2] https://github.com/python/cpython/blob/a58ebcc701dd6c43630df941481475ff0f615a81/Lib/shutil.py#L829-L836
[3] https://bugs.python.org/issue46727
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions