[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] f32c8b: Fix win32 long path name with a simpler solution a...
noreply at github.com
Mon Oct 30 20:08:46 UTC 2017
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2017-10-30 (Mon, 30 Oct 2017)
Fix win32 long path name with a simpler solution a la Esteban
Having two macros ALLOC_WIN32_PATH and REALLOC_WIN32_PATH that do almost the same thing smells.
It is a lot simpler to concatenate native utf8 path and file names, then call ALLOC_WIN32_PATH once
like Esteban Lorenzano did propose, rather than doing the work on converted WCHAR win32Path.
Some more details:
The concatenated fullPath does not require a trailing null char because MultiByteToWideChar() invoked by ALLOC_WIN32_PATH cares of it
The lastString cache is now handled in utf8 too, without trailing null either- hence we don't use strcmp()
More information about the Vm-dev