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

On Nov  9 09:17, aputerguy wrote:
> 
> Actually the behavior is even stranger... renaming and then deleting
> junctions creates spurious directories.
> 
> echo "This is a test file" >| targetfile
> mkdir targetdir
> echo "This is a test dir file" >| targetdir/targetdirfile
> 
> junction.exe junctionfile targetfile
> junction.exe junctiondir targetdir
> 
> ls -Ag
> drwxr-xr-x 1 None  0 2009-11-09 11:56 junctiondir/
> -rw-r--r-- 1 None 20 2009-11-09 11:55 junctionfile
> drwxr-xr-x 1 None  0 2009-11-09 11:56 targetdir/
> -rw-r--r-- 1 None 20 2009-11-09 11:55 targetfile
> 
> mv junctionfile newjunctionfile
> mv junctiondir newjunctiondir
> 
> ls -Ag 
> drwxr-xr-x 1 ????????  0 2009-11-09 11:57 junctiondir/
> drwxr-xr-x 1 ????????  0 2009-11-09 11:57 junctionfile/
> drwxr-xr-x 1 None      0 2009-11-09 11:56 newjunctiondir/
> -rw-r--r-- 1 None     20 2009-11-09 11:55 newjunctionfile
> 
> junction.exe -d junctionfile
> junction.exe -d junctiondir
> 
> ls -Ag
> drwxr-xr-x  1 None  0 2009-11-09 11:56 newjunctiondir/
> -rw-r--r--  1 None 20 2009-11-09 11:55 newjunctionfile
> drwx------+ 1 None  0 2009-11-09 12:01 targetdir/
> drwx------+ 1 None  0 2009-11-09 12:01 targetfile/
> 
> Now this seems to be sheer madness.

Indeed, and I can't reproduce this, neither in Cygwin 1.5.25, nor in
Cygwin 1.7.  The only difference between your and my run is that I'm
using the cmd mklink builtin rather than the junction tool, like this:

 $ cmd /c mklink /j junctionfile targetfile
 Junction created for junctionfile <<===>> targetfile
 $ cmd /c mklink /j junctiondir targetdir
 Junction created for junctiondir <<===>> targetdir

BLODA?


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

