google / googletest

GoogleTest - Google Testing and Mocking Framework
https://google.github.io/googletest/
BSD 3-Clause "New" or "Revised" License
34.51k stars 10.09k forks source link

Make FilePath::GetCurrentDir() not returning trailing slash on Windows #4550

Open sergio-nsk opened 4 months ago

sergio-nsk commented 4 months ago

It returned the trailing backslash if the current working directory was a root directory. It should be consistent w/ all cases.

_getcwd, _wgetcwd

_getcwd returns a string that represents the path of the current working directory. If the current working directory is the root, the string ends with a backslash (\). If the current working directory is a directory other than the root, the string ends with the directory name and not with a backslash.