From 2cdc2d67e12b98c72f0fb35f88e58f91c14ec0f9 Mon Sep 17 00:00:00 2001 From: Kim Gybels Date: Sat, 5 Apr 2025 22:41:59 +0200 Subject: [PATCH] fixup! mingw: support long paths When rebasing c8b6c1db91d8 (mingw: support long paths, 2015-07-28) on top of 391bceae4350 (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27) a newly introduced MAX_PATH buffer was not increased to MAX_LONG_PATH. This fixes https://github.com/git-for-windows/git/issues/5476 Signed-off-by: Kim Gybels --- compat/mingw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/mingw.c b/compat/mingw.c index c5aeb0bd07d9b6..11173e6b2fd372 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2857,9 +2857,9 @@ int mingw_rename(const char *pold, const char *pnew) * flex array so that the structure has to be allocated on * the heap. As we declare this structure ourselves though * we can avoid the allocation and define FileName to have - * MAX_PATH bytes. + * MAX_LONG_PATH bytes. */ - WCHAR FileName[MAX_PATH]; + WCHAR FileName[MAX_LONG_PATH]; } rename_info = { 0 }; HANDLE old_handle = INVALID_HANDLE_VALUE; BOOL success;