Fix mkdir command, if compiled in UNICODE. Patch by Pierre Schweitzer (heis_spiter at hotmail dot com)

See issue #2216 for more details.

svn path=/trunk/; revision=26545
This commit is contained in:
Hervé Poussineau 2007-04-27 17:40:50 +00:00
parent 07a4c5d550
commit 253fa4b7a0
3 changed files with 6 additions and 4 deletions

View file

@ -440,7 +440,7 @@ MakeFullPath(TCHAR * DirPath)
while ((p = _tcschr(p, _T('\\'))) != NULL)
{
n = p - DirPath + 1;
memcpy(path, DirPath, n);
_tcsncpy(path, DirPath, n);
path[n] = _T('\0');
if( !CreateDirectory(path, NULL) &&
(GetLastError() != ERROR_ALREADY_EXISTS))