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.)
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c
index 66d12cf..8af07e6 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;
}