windows: use Mercurial encode/decode methods when reading a link
Using `os.fsdecode()` goes all the way back to the py3 porting in 5fe0b880200e. The problem was that reading a lock with non ASCII characters in the path could fail with a UnicodeDecodeError immediately after attempting to create the same lock file failed because it already exists. I have no idea why I used those functions- bytes are passed in by Mercurial, so presumably the bytes are in Mercurial encoding, and need to be decoded using the same. This was reported on the TortoiseHg tracker as mercurial/tortoisehg/thg#5923 (comment 303072)
parent
04d5cde28a7f
Loading
Please register or sign in to comment