On Thu, Mar 28, 2019 at 2:09 PM Hans Leidekker hans@codeweavers.com wrote:
On Thu, 2019-03-28 at 13:30 -0600, Erich E. Hoover wrote:
... We have to pick something for non-Wine symlinks, unless you want to always treat them as regular (non-reparse point) files? Treating regular symlinks as NT Symlinks seem like the easiest choice, since they support both file and directory symlinks.
You wouldn't be able to report their type correctly if the target doesn't exist.
An NT Symlink can either be to a directory or a file, so if we report all non-Wine symlinks as NT Symlinks then the type of link is always "correct". But maybe I'm misunderstanding you and you're talking about some other form of type reporting?
... I see. So I guess CreateSymbolicLink would call CreateFile(linkname, CREATE_NEW) and then call DeviceIoControl(FSCTL_SET_REPARSE_POINT) with that handle.
That's correct. So, by the time CreateSymbolicLink returns the file is swapped with the symlink and the temporary directory is removed.
Best, Erich