RFC: Junction Point/NT Symlink Support

Erich E. Hoover erich.e.hoover at gmail.com
Thu Mar 28 16:53:01 CDT 2019


On Thu, Mar 28, 2019 at 3:17 PM Hans Leidekker <hans at codeweavers.com> wrote:
> On Thu, 2019-03-28 at 14:22 -0600, Erich E. Hoover wrote:
> > ...
> > 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?
>
> See the flags parameter to CreateSymbolicLink which controls whether
> the link created is a file symlink (0) or a directory symlink
> (SYMBOLIC_LINK_FLAG_DIRECTORY). File symlinks behave as files, so you
> remove them with DeleteFile for example. Likewise, calling DeleteFile
> on a directory symlink should fail.

Oh, I understand what you're talking about now - sorry about that.  I
actually have no idea whether it cares how you delete dangling
symlinks, I'll have to put together a test and see.

I've been thinking about this magic-filename approach and it might not
be too terrible to store the entire reparse tag.  Examples:
junction point (0xA0000003) to /mydir:
/././///////////////////////////.//.//mydir
absolute symlink (0xA000000C, Flags=0) to /mydir:
///././/////////////////////////.//.//mydir
relative symlink (0xA000000C, Flags=1) to ./mydir:
.///././/////////////////////////.//././mydir

Clearly I'll have to modify this to store whether it's a directory or
not (if Windows cares about this for dangling symlinks).  How would
people feel about this use of the magic string?

Best,
Erich



More information about the wine-devel mailing list