@@ -27,7 +27,7 @@ struct one_watch
27
27
DWORD count ;
28
28
29
29
struct strbuf path ;
30
- wchar_t wpath_longname [MAX_PATH + 1 ];
30
+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
31
31
DWORD wpath_longname_len ;
32
32
33
33
HANDLE hDir ;
@@ -130,8 +130,8 @@ static int normalize_path_in_utf8(wchar_t *wpath, DWORD wpath_len,
130
130
*/
131
131
static void check_for_shortnames (struct one_watch * watch )
132
132
{
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 ];
135
135
wchar_t * last ;
136
136
wchar_t * p ;
137
137
@@ -196,8 +196,8 @@ static enum get_relative_result get_relative_longname(
196
196
const wchar_t * wpath , DWORD wpath_len ,
197
197
wchar_t * wpath_longname , size_t bufsize_wpath_longname )
198
198
{
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 ];
201
201
DWORD root_len ;
202
202
DWORD out_len ;
203
203
@@ -297,10 +297,10 @@ static struct one_watch *create_watch(const char *path)
297
297
FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE ;
298
298
HANDLE hDir ;
299
299
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 ];
302
302
303
- if (xutftowcs_path (wpath , path ) < 0 ) {
303
+ if (xutftowcs_long_path (wpath , path ) < 0 ) {
304
304
error (_ ("could not convert to wide characters: '%s'" ), path );
305
305
return NULL ;
306
306
}
@@ -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