Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit dc371d1

Browse files
committed
fixup! Win32: fix checkout problem with directories exceeding MAX_PATH
We cannot magically enlarge cache_def's PATH_MAX-sized buffer...
1 parent d49a708 commit dc371d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

symlinks.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ static int lstat_cache_matchlen(struct cache_def *cache,
158158
* for the moment!
159159
*/
160160
save_flags = *ret_flags & track_flags & (FL_NOENT|FL_SYMLINK);
161-
if (save_flags && last_slash > 0 && last_slash <= MAX_LONG_PATH) {
161+
if (save_flags && last_slash > 0 && last_slash <= PATH_MAX) {
162162
cache->path[last_slash] = '\0';
163163
cache->len = last_slash;
164164
cache->flags = save_flags;
165165
} else if ((track_flags & FL_DIR) &&
166-
last_slash_dir > 0 && last_slash_dir <= MAX_LONG_PATH) {
166+
last_slash_dir > 0 && last_slash_dir <= PATH_MAX) {
167167
/*
168168
* We have a separate test for the directory case,
169169
* since it could be that we have found a symlink or a

0 commit comments

Comments
 (0)