1 #include "../../git-compat-util.h"
3 int win32_skip_dos_drive_prefix(char **path
)
5 int ret
= has_dos_drive_prefix(*path
);
10 int win32_offset_1st_component(const char *path
)
12 char *pos
= (char *)path
;
15 if (!skip_dos_drive_prefix(&pos
) &&
16 is_dir_sep(pos
[0]) && is_dir_sep(pos
[1])) {
17 /* skip server name */
18 pos
= strpbrk(pos
+ 2, "\\/");
20 return 0; /* Error: malformed unc path */
24 } while (*pos
&& !is_dir_sep(*pos
));
27 return pos
+ is_dir_sep(*pos
) - path
;