emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs and Windows junctions


From: Eli Zaretskii
Subject: Re: Emacs and Windows junctions
Date: Thu, 19 Feb 2015 10:50:10 +0200

> From: Fabrice Popineau <address@hidden>
> Date: Wed, 18 Feb 2015 14:09:52 +0000 (UTC)
> 
> This question has been asked on Stackexchange:
> 
> http://emacs.stackexchange.com/questions/6070/hard-and-soft-links-junctions-under-windows
> 
> How difficult would it be to report junctions as symlinks?
> I find it desirable and informative.
> 
> Moreover, all the support seems to be already there.
> Specifically, it would suffice to handle the case of 
> IO_REPARSE_TAG_MOUNT_POINT in src/w32.c/is_symlink() 
> and src/w32.c/readlink() the same way it is done for 
> IO_REPARSE_TAG_SYMLINK.

Junction points are more like hard links to directories than like
symlinks, although deleting the target of a junction leaves the
junction pointing nowhere, which is more like a symlink.  But other
features are more like hard links: they actually share the data with
the target, and don't require UAC elevation to create them.  Also,
symlinks are not supported before Vista, so having only symlinks to
directories on those systems would be confusing, I think.

So IMO treating junction points as symlinks would be wrong due to a
different semantics and feature set.

We could perhaps treat junction points as hard links to directories
(since the "normal" hard links don't support directories on NTFS).  So
perhaps changing sys_link to create a junction point when the target
is a directory, provided that the nlinks member of the list returned
by file-attributes will indeed reflect that it's a hard link
(currently, we return it as 1, i.e. some special code for junctions
should be added to our implementation of 'stat').

That said, I'm not sure I see any important use cases for adding this
functionality, so perhaps I'm missing something.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]