summaryrefslogtreecommitdiff
path: root/src/win32/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32/posix.c')
-rw-r--r--src/win32/posix.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/win32/posix.c b/src/win32/posix.c
index 003ce1fd6..610a4166c 100644
--- a/src/win32/posix.c
+++ b/src/win32/posix.c
@@ -1,4 +1,5 @@
#include "posix.h"
+#include "path.h"
#include <errno.h>
int p_unlink(const char *path)
@@ -189,3 +190,13 @@ int p_hide_directory__w32(const char *path)
return error;
}
+int p_realpath(const char *orig_path, char *buffer)
+{
+ int ret = GetFullPathName(orig_path, GIT_PATH_MAX, buffer, NULL);
+ if (!ret || ret > GIT_PATH_MAX)
+ return GIT_EOSERR;
+
+ git_path_mkposix(buffer);
+ return GIT_SUCCESS;
+}
+