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

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 9 Nov 2009 18:30:10 +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: <20091109173010.GA13951@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> <26270112 DOT post AT talk DOT nabble DOT com>
MIME-Version: 1.0
In-Reply-To: <26270112.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 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

- Raw text -


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