This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Finding junction points in cygwin


On Nov  9 08:51, aputerguy wrote:
> 
> Corinna Vinschen writes
> > Not quite.  Directory junctions appear as symlinks.  Volume junctions
> > are treated as simple directories since they are for all practically
> > purposes the same as Unix mount points.
> 
> But I still see several issues at least with directory junctions.
> 1. When I use junction.exe to make a junction with a regular file, the
> junction shows up as a regular file under cygwin. When I make a junction to
> a directory, the junction shows up as a directory. In particular, I don't
> see symlinks in either case.

Are you running Cygwin 1.5.25?  If so, yes, Cygwin 1.5.25 doesn't know
anything about junctions or native symlinks.  It only sees what is
visible through the Win32 API.

Btw., while directory junctions can point to files, they are always
treated as directories by the Win32 API.  There's no way to access the
target file of such a directory junction from non-Cygwin applications
like Windows Explorer or CMD.  It's not really supported to do so, and
it's kind of schizophrenic that the CMD builtin command mklink allows
to create such directory junctions pointing to files.

> 2. Shouldn't we have a way of identify and/or differentiating junctions from
> their targets. For example, cygwin (appropriately) doesn't allow you to
> remove junctions using 'rm' (either files or directories). But if I am
> writing code to manipulate files, I would like to be able to identify
> junctions pro-actively rather than retroactively by the fact that I can't
> remove them.

Try Cygwin 1.7.  It recognizes directory junctions as symlinks.

> 3. Moving a junction, moves the target file. And leaves the junction itself
> 'unlinked'. I'm not sure this is the logical behavior expected, particularly
> if it is supposed to act like a symlink. Because with symlinks, 'mv' moves
> the link not the target.

Try Cygwin 1.7.  It recognizes directory junctions as symlinks.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]