@@ -27,7 +27,7 @@ struct one_watch
2727 DWORD count ;
2828
2929 struct strbuf path ;
30- wchar_t wpath_longname [MAX_PATH + 1 ];
30+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
3131 DWORD wpath_longname_len ;
3232
3333 HANDLE hDir ;
@@ -130,8 +130,8 @@ static int normalize_path_in_utf8(wchar_t *wpath, DWORD wpath_len,
130130 */
131131static void check_for_shortnames (struct one_watch * watch )
132132{
133- wchar_t buf_in [MAX_PATH + 1 ];
134- wchar_t buf_out [MAX_PATH + 1 ];
133+ wchar_t buf_in [MAX_LONG_PATH + 1 ];
134+ wchar_t buf_out [MAX_LONG_PATH + 1 ];
135135 wchar_t * last ;
136136 wchar_t * p ;
137137
@@ -196,8 +196,8 @@ static enum get_relative_result get_relative_longname(
196196 const wchar_t * wpath , DWORD wpath_len ,
197197 wchar_t * wpath_longname , size_t bufsize_wpath_longname )
198198{
199- wchar_t buf_in [2 * MAX_PATH + 1 ];
200- wchar_t buf_out [MAX_PATH + 1 ];
199+ wchar_t buf_in [2 * MAX_LONG_PATH + 1 ];
200+ wchar_t buf_out [MAX_LONG_PATH + 1 ];
201201 DWORD root_len ;
202202 DWORD out_len ;
203203
@@ -297,10 +297,10 @@ static struct one_watch *create_watch(const char *path)
297297 FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE ;
298298 HANDLE hDir ;
299299 DWORD len_longname ;
300- wchar_t wpath [MAX_PATH + 1 ];
301- wchar_t wpath_longname [MAX_PATH + 1 ];
300+ wchar_t wpath [MAX_LONG_PATH + 1 ];
301+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
302302
303- if (xutftowcs_path (wpath , path ) < 0 ) {
303+ if (xutftowcs_long_path (wpath , path ) < 0 ) {
304304 error (_ ("could not convert to wide characters: '%s'" ), path );
305305 return NULL ;
306306 }
@@ -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