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 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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