mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 10:17:20 +00:00
Made is_windows_rooted_path() able to cope with awkward but valid relative paths such as "C:..\File.txt".
Path "C:..\File.txt" refers to a file called File.txt located in the parent directory of the current directory on drive C:.
This commit is contained in:
parent
23a1edbd04
commit
2c08c3f074
@ -317,7 +317,7 @@ int gitfo_dirent(
|
|||||||
static int is_windows_rooted_path(const char* path)
|
static int is_windows_rooted_path(const char* path)
|
||||||
{
|
{
|
||||||
/* Does the root of the path look like a windows drive ? */
|
/* Does the root of the path look like a windows drive ? */
|
||||||
if (isalpha(path[0]) && (path[1] == ':') && (path[2] == '/'))
|
if (isalpha(path[0]) && (path[1] == ':'))
|
||||||
return GIT_SUCCESS;
|
return GIT_SUCCESS;
|
||||||
|
|
||||||
return GIT_ERROR;
|
return GIT_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user