https://bugs.winehq.org/show_bug.cgi?id=50770
--- Comment #5 from Erich E. Hoover erich.e.hoover@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/a11594e19e035f3184ab46a04e...
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/b41f1cb...
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/a2ca43d98b3a45ae3bd66e8c71...
Hopefully this is something simple and I'm just not seeing it at the moment, any thoughts?