www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/09/12:18:23

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 9 Nov 2009 18:18:03 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Finding junction points in cygwin
Message-ID: <20091109171803.GK26344@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <26260606 DOT post AT talk DOT nabble DOT com> <416096c60911082351l7e3415e2s28f10549f3cf4136 AT mail DOT gmail DOT com> <20091109120333 DOT GF26344 AT calimero DOT vinschen DOT de> <26269606 DOT post AT talk DOT nabble DOT com>
MIME-Version: 1.0
In-Reply-To: <26269606.post@talk.nabble.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019