提交 0bc6180b 编写于 作者: J Junio C Hamano

Merge branch 'nd/maint-relative' into maint

* nd/maint-relative:
  get_cwd_relative(): do not misinterpret root path
......@@ -965,6 +965,12 @@ char *get_relative_cwd(char *buffer, int size, const char *dir)
case '/':
return cwd + 1;
default:
/*
* dir can end with a path separator when it's root
* directory. Return proper prefix in that case.
*/
if (dir[-1] == '/')
return cwd;
return NULL;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册