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

Commit d147b44

Browse files
committed
fixup! Win32: fix checkout problem with directories exceeding MAX_PATH
We must not use MAX_LONG_PATH outside of the Windows-specific code...
1 parent dc371d1 commit d147b44

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
@@ -121,7 +121,7 @@ static int lstat_cache_matchlen(struct cache_def *cache,
121121
*/
122122
*ret_flags = FL_DIR;
123123
last_slash_dir = last_slash;
124-
max_len = len < MAX_LONG_PATH ? len : MAX_LONG_PATH;
124+
max_len = len < PATH_MAX ? len : PATH_MAX;
125125
while (match_len < max_len) {
126126
do {
127127
cache->path[match_len] = name[match_len];
@@ -274,7 +274,7 @@ static int threaded_has_dirs_only_path(struct cache_def *cache, const char *name
274274
}
275275

276276
static struct removal_def {
277-
char path[MAX_LONG_PATH];
277+
char path[PATH_MAX];
278278
int len;
279279
} removal;
280280

0 commit comments

Comments
 (0)