##// END OF EJS Templates
windows: wrap `os.getcwd()` in `os.path.realpath()` on py3...
Matt Harbison -
r47037:3dfebba9 default
parent child Browse files
Show More
@@ -298,7 +298,12 b' if pycompat.ispy3:'
298 if pycompat.iswindows:
298 if pycompat.iswindows:
299 # Python 3 on Windows issues a DeprecationWarning about using the bytes
299 # Python 3 on Windows issues a DeprecationWarning about using the bytes
300 # API when os.getcwdb() is called.
300 # API when os.getcwdb() is called.
301 getcwd = lambda: strtolocal(os.getcwd()) # re-exports
301 #
302 # Additionally, py3.8+ uppercases the drive letter when calling
303 # os.path.realpath(), which is used on ``repo.root``. Since those
304 # strings are compared in various places as simple strings, also call
305 # realpath here. See https://bugs.python.org/issue40368
306 getcwd = lambda: strtolocal(os.path.realpath(os.getcwd())) # re-exports
302 else:
307 else:
303 getcwd = os.getcwdb # re-exports
308 getcwd = os.getcwdb # re-exports
304 else:
309 else:
General Comments 0
You need to be logged in to leave comments. Login now