mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-29 02:53:45 -05:00
Merge branch 'revert-pre-v4-fsmonitor-long-path' into revert-pre-v4-fsmonitor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user