Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sergio-nsk
Copy link
Contributor

@sergio-nsk sergio-nsk commented May 30, 2024

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.

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

[_getcwd, _wgetcwd](https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/getcwd-wgetcwd?view=msvc-170)
> _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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant