mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-29 04:28:53 -05:00
fixup! mingw: remove 248-char limit when creating directories
Actually, this commit was totally misguided. The path length limit for non-long paths (at least before Windows 10 build 1067 with long paths opted in) *is* 248, and we still want to convert to Root Local Device Path if that limit is reached. I misread the intention of the code when I made that patch to "remove the 248-char limit", thinking that there was a hard limit to 248 characters even in the long path case, which was incorrect. Simply revert that commit and be done. This fixes https://github.com/git-for-windows/git/issues/1084 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -496,7 +496,9 @@ int mingw_mkdir(const char *path, int mode)
|
||||
{
|
||||
int ret;
|
||||
wchar_t wpath[MAX_LONG_PATH];
|
||||
if (xutftowcs_long_path(wpath, path) < 0)
|
||||
/* CreateDirectoryW path limit is 248 (MAX_PATH - 8.3 file name) */
|
||||
if (xutftowcs_path_ex(wpath, path, MAX_LONG_PATH, -1, 248,
|
||||
core_long_paths) < 0)
|
||||
return -1;
|
||||
|
||||
ret = _wmkdir(wpath);
|
||||
|
||||
Reference in New Issue
Block a user