Mercurial > hgrepos > Python > apps > py-cutils
changeset 166:ed45abb4940f
FIX: in util.normalize_filename(): use the 'u"' prefix in the else part for non-byte strings
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 09 Jan 2025 14:06:01 +0100 |
| parents | b32b41297893 |
| children | ffd14e2de130 |
| files | cutils/util/__init__.py |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cutils/util/__init__.py Thu Jan 09 13:57:03 2025 +0100 +++ b/cutils/util/__init__.py Thu Jan 09 14:06:01 2025 +0100 @@ -156,9 +156,9 @@ while filename.startswith(b"./"): filename = filename[2:] else: - filename = filename.replace("\\", "/") + filename = filename.replace(u"\\", u"/") if strip_leading_dot_slash: - while filename.startswith("./"): + while filename.startswith(u"./"): filename = filename[2:] return filename
