@@ -25,7 +25,7 @@ struct one_watch
25
25
DWORD count ;
26
26
27
27
struct strbuf path ;
28
- wchar_t wpath_longname [MAX_PATH + 1 ];
28
+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
29
29
DWORD wpath_longname_len ;
30
30
31
31
HANDLE hDir ;
@@ -128,8 +128,8 @@ static int normalize_path_in_utf8(wchar_t *wpath, DWORD wpath_len,
128
128
*/
129
129
static void check_for_shortnames (struct one_watch * watch )
130
130
{
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 ];
133
133
wchar_t * last ;
134
134
wchar_t * p ;
135
135
@@ -194,8 +194,8 @@ static enum get_relative_result get_relative_longname(
194
194
const wchar_t * wpath , DWORD wpath_len ,
195
195
wchar_t * wpath_longname , size_t bufsize_wpath_longname )
196
196
{
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 ];
199
199
DWORD root_len ;
200
200
DWORD out_len ;
201
201
@@ -296,10 +296,10 @@ static struct one_watch *create_watch(struct fsmonitor_daemon_state *state,
296
296
FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE ;
297
297
HANDLE hDir ;
298
298
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 ];
301
301
302
- if (xutftowcs_path (wpath , path ) < 0 ) {
302
+ if (xutftowcs_long_path (wpath , path ) < 0 ) {
303
303
error (_ ("could not convert to wide characters: '%s'" ), path );
304
304
return NULL ;
305
305
}
@@ -544,7 +544,7 @@ static int process_worktree_events(struct fsmonitor_daemon_state *state)
544
544
struct string_list cookie_list = STRING_LIST_INIT_DUP ;
545
545
struct fsmonitor_batch * batch = NULL ;
546
546
const char * p = watch -> buffer ;
547
- wchar_t wpath_longname [MAX_PATH + 1 ];
547
+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
548
548
549
549
/*
550
550
* If the kernel gets more events than will fit in the kernel
0 commit comments