summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-05-24 11:09:38 +0200
committerPatrick Steinhardt <ps@pks.im>2017-10-09 11:19:41 +0200
commitf38ce9b61dee1bb2d3ba495937c685311f196574 (patch)
tree2470c0b1ce1baf6a38646d48b1c787e2e5d92d5b /src/win32
parente54cf1a3eed8f2375b9e5d4dac9bf4ded57bdd01 (diff)
downloadlibgit2-f38ce9b61dee1bb2d3ba495937c685311f196574.tar.gz
path: expose `git_path_is_dirsep`
This function has previously been implemented in Windows-specific path handling code as `path__is_dirsep`. As we will need this functionality in other parts, extract the logic into "path.h" alongside with a non-Windows implementation.
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/path_w32.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/win32/path_w32.c b/src/win32/path_w32.c
index 8cea48b58..5e24260f7 100644
--- a/src/win32/path_w32.c
+++ b/src/win32/path_w32.c
@@ -18,8 +18,6 @@
#define PATH__ABSOLUTE_LEN 3
-#define path__is_dirsep(p) ((p) == '/' || (p) == '\\')
-
#define path__is_nt_namespace(p) \
(((p)[0] == '\\' && (p)[1] == '\\' && (p)[2] == '?' && (p)[3] == '\\') || \
((p)[0] == '/' && (p)[1] == '/' && (p)[2] == '?' && (p)[3] == '/'))
@@ -56,7 +54,7 @@ static wchar_t *path__skip_server(wchar_t *path)
wchar_t *c;
for (c = path; *c; c++) {
- if (path__is_dirsep(*c))
+ if (git_path_is_dirsep(*c))
return c + 1;
}