[OpenSmalltalk/opensmalltalk-vm] 59d036: Fix access to files with long file names on win32/...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] 59d036: Fix access to files with long file names on win32/...

GitHub
 
  Branch: refs/heads/FIX_WIN32_LONG_FILENAME
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 59d0365754f86754546641662518135eb0770c04
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/59d0365754f86754546641662518135eb0770c04
  Author: Nicolas Cellier <[hidden email]>
  Date:   2017-10-29 (Sun, 29 Oct 2017)

  Changed paths:
    M platforms/win32/plugins/FilePlugin/sqWin32File.h

  Log Message:
  -----------
  Fix access to files with long file names on win32/win64

Long path were already handled with a prefix '\\?\' thanks to ALLOC_WIN32_PATH macro defined in platforms/win32/plugins/FilePlugin/sqWin32File.h
Unfortunately, when concatenating a file path shorter than MAX_PATH with a file name making the total longer than MAX_PATH,
using the macro REALLOC_WIN32_PATH, there were no '\\?\' prepended, and the file access did fail...

This commit does fix the REALLOC_WIN32_PATH to handle the case when path become longer than limit after growth.