Skip to content

Commit d6c7ca3

Browse files
committed
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.)
1 parent 1369010 commit d6c7ca3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/win32/posix_w32.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ int p_getcwd(char *buffer_out, size_t size)
648648
if (!cwd)
649649
return -1;
650650

651+
git_win32_path_remove_namespace(cwd, wcslen(cwd));
652+
651653
/* Convert the working directory back to UTF-8 */
652654
if (git__utf16_to_8(buffer_out, size, cwd) < 0) {
653655
DWORD code = GetLastError();
@@ -660,6 +662,7 @@ int p_getcwd(char *buffer_out, size_t size)
660662
return -1;
661663
}
662664

665+
git_path_mkposix(buffer_out);
663666
return 0;
664667
}
665668

0 commit comments

Comments
 (0)