Commit 564f0f7b by Vicent Martí

Merge pull request #388 from lambourg/master

pull request for #387
parents c035ede2 13bc2016
......@@ -96,6 +96,16 @@ int git_path_dirname_r(char *buffer, size_t bufflen, const char *path)
len = endp - path +1;
#ifdef GIT_WIN32
/* Mimic unix behavior where '/.git' returns '/': 'C:/.git' will return
'C:/' here */
if (len == 2 && isalpha(path[0]) && path[1] == ':') {
len = 3;
goto Exit;
}
#endif
Exit:
result = len;
if (len+1 > GIT_PATH_MAX) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment