@@ -25,7 +25,7 @@ struct one_watch
2525 DWORD count ;
2626
2727 struct strbuf path ;
28- wchar_t wpath_longname [MAX_PATH + 1 ];
28+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
2929 DWORD wpath_longname_len ;
3030
3131 HANDLE hDir ;
@@ -128,8 +128,8 @@ static int normalize_path_in_utf8(wchar_t *wpath, DWORD wpath_len,
128128 */
129129static void check_for_shortnames (struct one_watch * watch )
130130{
131- wchar_t buf_in [MAX_PATH + 1 ];
132- wchar_t buf_out [MAX_PATH + 1 ];
131+ wchar_t buf_in [MAX_LONG_PATH + 1 ];
132+ wchar_t buf_out [MAX_LONG_PATH + 1 ];
133133 wchar_t * last ;
134134 wchar_t * p ;
135135
@@ -194,8 +194,8 @@ static enum get_relative_result get_relative_longname(
194194 const wchar_t * wpath , DWORD wpath_len ,
195195 wchar_t * wpath_longname , size_t bufsize_wpath_longname )
196196{
197- wchar_t buf_in [2 * MAX_PATH + 1 ];
198- wchar_t buf_out [MAX_PATH + 1 ];
197+ wchar_t buf_in [2 * MAX_LONG_PATH + 1 ];
198+ wchar_t buf_out [MAX_LONG_PATH + 1 ];
199199 DWORD root_len ;
200200 DWORD out_len ;
201201
@@ -296,10 +296,10 @@ static struct one_watch *create_watch(struct fsmonitor_daemon_state *state,
296296 FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE ;
297297 HANDLE hDir ;
298298 DWORD len_longname ;
299- wchar_t wpath [MAX_PATH + 1 ];
300- wchar_t wpath_longname [MAX_PATH + 1 ];
299+ wchar_t wpath [MAX_LONG_PATH + 1 ];
300+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
301301
302- if (xutftowcs_path (wpath , path ) < 0 ) {
302+ if (xutftowcs_long_path (wpath , path ) < 0 ) {
303303 error (_ ("could not convert to wide characters: '%s'" ), path );
304304 return NULL ;
305305 }
@@ -544,7 +544,7 @@ static int process_worktree_events(struct fsmonitor_daemon_state *state)
544544 struct string_list cookie_list = STRING_LIST_INIT_DUP ;
545545 struct fsmonitor_batch * batch = NULL ;
546546 const char * p = watch -> buffer ;
547- wchar_t wpath_longname [MAX_PATH + 1 ];
547+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
548548
549549 /*
550550 * If the kernel gets more events than will fit in the kernel
0 commit comments