@@ -28,7 +28,7 @@ struct one_watch
28
28
DWORD count ;
29
29
30
30
struct strbuf path ;
31
- wchar_t wpath_longname [MAX_PATH + 1 ];
31
+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
32
32
DWORD wpath_longname_len ;
33
33
34
34
HANDLE hDir ;
@@ -131,8 +131,8 @@ static int normalize_path_in_utf8(wchar_t *wpath, DWORD wpath_len,
131
131
*/
132
132
static void check_for_shortnames (struct one_watch * watch )
133
133
{
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 ];
136
136
wchar_t * last ;
137
137
wchar_t * p ;
138
138
@@ -197,8 +197,8 @@ static enum get_relative_result get_relative_longname(
197
197
const wchar_t * wpath , DWORD wpath_len ,
198
198
wchar_t * wpath_longname , size_t bufsize_wpath_longname )
199
199
{
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 ];
202
202
DWORD root_len ;
203
203
DWORD out_len ;
204
204
@@ -298,10 +298,10 @@ static struct one_watch *create_watch(const char *path)
298
298
FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE ;
299
299
HANDLE hDir ;
300
300
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 ];
303
303
304
- if (xutftowcs_path (wpath , path ) < 0 ) {
304
+ if (xutftowcs_long_path (wpath , path ) < 0 ) {
305
305
error (_ ("could not convert to wide characters: '%s'" ), path );
306
306
return NULL ;
307
307
}
@@ -545,7 +545,7 @@ static int process_worktree_events(struct fsmonitor_daemon_state *state)
545
545
struct string_list cookie_list = STRING_LIST_INIT_DUP ;
546
546
struct fsmonitor_batch * batch = NULL ;
547
547
const char * p = watch -> buffer ;
548
- wchar_t wpath_longname [MAX_PATH + 1 ];
548
+ wchar_t wpath_longname [MAX_LONG_PATH + 1 ];
549
549
550
550
/*
551
551
* If the kernel gets more events than will fit in the kernel
0 commit comments