]> git.ipfire.org Git - thirdparty/git.git/blobdiff - compat/basename.c
Refactor skipping DOS drive prefixes
[thirdparty/git.git] / compat / basename.c
index d8f8a3c6dc039ff8891d04857be737b29259d7c6..9f00421a26c306dbe5e40895594869f21c8405f7 100644 (file)
@@ -4,9 +4,7 @@
 char *gitbasename (char *path)
 {
        const char *base;
-       /* Skip over the disk name in MSDOS pathnames. */
-       if (has_dos_drive_prefix(path))
-               path += 2;
+       skip_dos_drive_prefix(&path);
        for (base = path; *path; path++) {
                if (is_dir_sep(*path))
                        base = path + 1;