fix reading smb shares on windows

This commit is contained in:
ed 2023-02-12 13:59:34 +00:00
parent 617321631a
commit 641929191e

View file

@ -1856,7 +1856,7 @@ def _msenc(txt: str) -> bytes:
txt = absreal(txt)
ret = txt.encode(FS_ENCODING, "surrogateescape")
return ret if ret.startswith(b"\\\\?\\") else b"\\\\?\\" + ret
return ret if ret.startswith(b"\\\\") else b"\\\\?\\" + ret
w8dec = _w8dec3 if not PY2 else _w8dec2