[Bug 50770] Unable to create symlinks to files in a nonexistent directory

WineHQ Bugzilla wine-bugs at winehq.org
Tue Mar 9 10:54:45 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=50770

--- Comment #5 from Erich E. Hoover <erich.e.hoover at gmail.com> ---
(In reply to Hans Leidekker from comment #4)
> So NT symlinks come in two flavors, file symlinks and directory symlinks,
> and to remove them you need to use DeleteFile and RemoveDirectory
> respectively.
> 
> This means we need to know the symlink type. We can't take it from the
> target because it may not exist, which suggests it should be encoded in the
> symlink itself.

Yes, that's correct.  I already have the target type encoded in the symlink,
but at the moment it infers it from the type of the target:

https://github.com/wine-staging/wine-staging/blob/a11594e19e035f3184ab46a04e0272580e9d7762/patches/ntdll-Junction_Points/0007-ntdll-Add-support-for-absolute-symlink-creation.patch#L244

The reason for that is that I don't know how to convert
SYMBOLIC_LINK_FLAG_DIRECTORY into a flag/option/whatever for the reparse point,
as that's not in the documentation:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/b41f1cbf-10df-4a47-98d4-1c52a833d913

I used to have it use the information from the opened handle, but I discovered
looking into this that that either stopped working or that I had incorrectly
believed that it was working before:
https://github.com/wine-staging/wine-staging/blob/a2ca43d98b3a45ae3bd66e8c71090b42e18c9bdd/patches/ntdll-Junction_Points/0007-ntdll-Add-support-for-absolute-symlink-creation.patch#L244

Hopefully this is something simple and I'm just not seeing it at the moment,
any thoughts?

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list