A Windows path starting with a backslash is absolute

This fixes prefix_path() not recognizing e.g. \foo\bar as an absolute path on Windows. Signed-off-by: Theo Niessink <theo@taletn.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Theo Niessink committed May 27, 2011 at 18:00 UTC 88135203af9df27c0f9c76c27bbbf48833bb31c8
1 file changed +1 -1
cache.h
+1 -1
@@ -715,7 +715,7 @@ extern char *expand_user_path(const char *path);
715 char *enter_repo(char *path, int strict);
716 static inline int is_absolute_path(const char *path)
717 {
718 - return path[0] == '/' || has_dos_drive_prefix(path);
718 + return is_dir_sep(path[0]) || has_dos_drive_prefix(path);
719 }
720 int is_directory(const char *);
721 const char *make_absolute_path(const char *path);