diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-25 14:36:25 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-25 14:39:01 +0100 |
commit | d6c7ca3ea99aa97d520d741dee2a8542cd0f2e38 (patch) | |
tree | 002c544e8012e6770bbe2da6897e5e21f6af8606 | |
parent | 136901086ecfdd2b5cc106782310355a9c0b1a9a (diff) | |
download | libgit2-d6c7ca3ea99aa97d520d741dee2a8542cd0f2e38.tar.gz |
win32: posixify the output of p_getcwd
Make p_getcwd match the rest of our win32 path handling semantics.
(This is currently only used in tests, which is why this disparity went
unnoticed.)
-rw-r--r-- | src/win32/posix_w32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index 66d12cfcf..8af07e6fa 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -648,6 +648,8 @@ int p_getcwd(char *buffer_out, size_t size) if (!cwd) return -1; + git_win32_path_remove_namespace(cwd, wcslen(cwd)); + /* Convert the working directory back to UTF-8 */ if (git__utf16_to_8(buffer_out, size, cwd) < 0) { DWORD code = GetLastError(); @@ -660,6 +662,7 @@ int p_getcwd(char *buffer_out, size_t size) return -1; } + git_path_mkposix(buffer_out); return 0; } |