[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] f32c8b: Fix win32 long path name with a simpler solution a...
GitHub
noreply at github.com
Mon Oct 30 20:08:46 UTC 2017
Branch: refs/heads/FIX_WIN32_LONG_FILENAME
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: f32c8bb4101ce232e3e47d6857d651828fb29a9b
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/f32c8bb4101ce232e3e47d6857d651828fb29a9b
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2017-10-30 (Mon, 30 Oct 2017)
Changed paths:
M platforms/win32/plugins/FilePlugin/sqWin32File.h
M platforms/win32/vm/sqWin32Directory.c
Log Message:
-----------
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
mailing list