From dc371d10a9ff69b5b5e70241c7f5da8511de9f42 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 3 Jul 2014 17:30:51 -0500 Subject: [PATCH] fixup! Win32: fix checkout problem with directories exceeding MAX_PATH We cannot magically enlarge cache_def's PATH_MAX-sized buffer... --- symlinks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symlinks.c b/symlinks.c index e02b31afa6..54b3bf9010 100644 --- a/symlinks.c +++ b/symlinks.c @@ -158,12 +158,12 @@ static int lstat_cache_matchlen(struct cache_def *cache, * for the moment! */ save_flags = *ret_flags & track_flags & (FL_NOENT|FL_SYMLINK); - if (save_flags && last_slash > 0 && last_slash <= MAX_LONG_PATH) { + if (save_flags && last_slash > 0 && last_slash <= PATH_MAX) { cache->path[last_slash] = '\0'; cache->len = last_slash; cache->flags = save_flags; } else if ((track_flags & FL_DIR) && - last_slash_dir > 0 && last_slash_dir <= MAX_LONG_PATH) { + last_slash_dir > 0 && last_slash_dir <= PATH_MAX) { /* * We have a separate test for the directory case, * since it could be that we have found a symlink or a -- 2.11.4.GIT