From: Theo Niessink Date: Fri, 27 May 2011 16:00:38 +0000 (+0200) Subject: A Windows path starting with a backslash is absolute X-Git-Tag: v1.7.7-rc0~117^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=88135203af9df27c0f9c76c27bbbf48833bb31c8;p=git.git 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 Signed-off-by: Erik Faye-Lund Signed-off-by: Junio C Hamano --- diff --git a/cache.h b/cache.h index 5e9675d76..9d3d92cf9 100644 --- a/cache.h +++ b/cache.h @@ -715,7 +715,7 @@ extern char *expand_user_path(const char *path); char *enter_repo(char *path, int strict); static inline int is_absolute_path(const char *path) { - return path[0] == '/' || has_dos_drive_prefix(path); + return is_dir_sep(path[0]) || has_dos_drive_prefix(path); } int is_directory(const char *); const char *make_absolute_path(const char *path);