diff options
Diffstat (limited to 'src/path.h')
-rw-r--r-- | src/path.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/path.h b/src/path.h index d674b1b94..aa24bcd2f 100644 --- a/src/path.h +++ b/src/path.h @@ -108,6 +108,9 @@ GIT_INLINE(int) git_path_is_dot_or_dotdotW(const wchar_t *name) #define git_path_is_absolute(p) \ (git__isalpha((p)[0]) && (p)[1] == ':' && ((p)[2] == '\\' || (p)[2] == '/')) +#define git_path_is_dirsep(p) \ + ((p) == '/' || (p) == '\\') + /** * Convert backslashes in path to forward slashes. */ @@ -126,6 +129,9 @@ GIT_INLINE(void) git_path_mkposix(char *path) #define git_path_is_absolute(p) \ ((p)[0] == '/') +#define git_path_is_dirsep(p) \ + ((p) == '/') + #endif /** |