@@ -28,7 +28,7 @@ struct one_watch
2828 DWORD count ;
2929
3030 struct strbuf path ;
31- wchar_t wpath_longname [MAX_PATH + 1 ];
31+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
3232 DWORD wpath_longname_len ;
3333
3434 HANDLE hDir ;
@@ -131,8 +131,8 @@ static int normalize_path_in_utf8(wchar_t *wpath, DWORD wpath_len,
131131 */
132132static void check_for_shortnames (struct one_watch * watch )
133133{
134- wchar_t buf_in [MAX_PATH + 1 ];
135- wchar_t buf_out [MAX_PATH + 1 ];
134+ wchar_t buf_in [MAX_LONG_PATH + 1 ];
135+ wchar_t buf_out [MAX_LONG_PATH + 1 ];
136136 wchar_t * last ;
137137 wchar_t * p ;
138138
@@ -197,8 +197,8 @@ static enum get_relative_result get_relative_longname(
197197 const wchar_t * wpath , DWORD wpath_len ,
198198 wchar_t * wpath_longname , size_t bufsize_wpath_longname )
199199{
200- wchar_t buf_in [2 * MAX_PATH + 1 ];
201- wchar_t buf_out [MAX_PATH + 1 ];
200+ wchar_t buf_in [2 * MAX_LONG_PATH + 1 ];
201+ wchar_t buf_out [MAX_LONG_PATH + 1 ];
202202 DWORD root_len ;
203203 DWORD out_len ;
204204
@@ -298,10 +298,10 @@ static struct one_watch *create_watch(const char *path)
298298 FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE ;
299299 HANDLE hDir ;
300300 DWORD len_longname ;
301- wchar_t wpath [MAX_PATH + 1 ];
302- wchar_t wpath_longname [MAX_PATH + 1 ];
301+ wchar_t wpath [MAX_LONG_PATH + 1 ];
302+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
303303
304- if (xutftowcs_path (wpath , path ) < 0 ) {
304+ if (xutftowcs_long_path (wpath , path ) < 0 ) {
305305 error (_ ("could not convert to wide characters: '%s'" ), path );
306306 return NULL ;
307307 }
@@ -545,7 +545,7 @@ static int process_worktree_events(struct fsmonitor_daemon_state *state)
545545 struct string_list cookie_list = STRING_LIST_INIT_DUP ;
546546 struct fsmonitor_batch * batch = NULL ;
547547 const char * p = watch -> buffer ;
548- wchar_t wpath_longname [MAX_PATH + 1 ];
548+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
549549
550550 /*
551551 * If the kernel gets more events than will fit in the kernel
0 commit comments