diff --git a/compat/fsmonitor/fsm-listen-win32.c b/compat/fsmonitor/fsm-listen-win32.c index 9bb9293559..2431492c3a 100644 --- a/compat/fsmonitor/fsm-listen-win32.c +++ b/compat/fsmonitor/fsm-listen-win32.c @@ -113,9 +113,9 @@ static struct one_watch *create_watch(struct fsmonitor_daemon_state *state, DWORD share_mode = FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE; HANDLE hDir; - wchar_t wpath[MAX_LONG_PATH]; + wchar_t wpath[MAX_PATH]; - if (xutftowcs_long_path(wpath, path) < 0) { + if (xutftowcs_path(wpath, path) < 0) { error(_("could not convert to wide characters: '%s'"), path); return NULL; } diff --git a/compat/fsmonitor/fsm-settings-win32.c b/compat/fsmonitor/fsm-settings-win32.c index 83d91f85ec..39e907046f 100644 --- a/compat/fsmonitor/fsm-settings-win32.c +++ b/compat/fsmonitor/fsm-settings-win32.c @@ -76,8 +76,8 @@ static enum fsmonitor_reason is_virtual(struct repository *r) */ static enum fsmonitor_reason is_remote(struct repository *r) { - wchar_t wpath[MAX_LONG_PATH]; - wchar_t wfullpath[MAX_LONG_PATH]; + wchar_t wpath[MAX_PATH]; + wchar_t wfullpath[MAX_PATH]; size_t wlen; UINT driveType; @@ -85,7 +85,7 @@ static enum fsmonitor_reason is_remote(struct repository *r) * Do everything in wide chars because the drive letter might be * a multi-byte sequence. See win32_has_dos_drive_prefix(). */ - if (xutftowcs_long_path(wpath, r->worktree) < 0) + if (xutftowcs_path(wpath, r->worktree) < 0) return FSMONITOR_REASON_ZERO; /* @@ -103,7 +103,7 @@ static enum fsmonitor_reason is_remote(struct repository *r) * slashes to backslashes. This is essential to get GetDriveTypeW() * correctly handle some UNC "\\server\share\..." paths. */ - if (!GetFullPathNameW(wpath, MAX_LONG_PATH, wfullpath, NULL)) + if (!GetFullPathNameW(wpath, MAX_PATH, wfullpath, NULL)) return FSMONITOR_REASON_ZERO; driveType = GetDriveTypeW(wfullpath);