Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <17B78BDF120BD411B70100500422FC6309E210@IIS000> From: Bernard Dautrevaux To: "'Corinna Vinschen'" Subject: RE: [ANNOUNCEMENT]: Important change to symbolic link functionali ty Date: Thu, 22 Feb 2001 17:19:53 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Corinna Vinschen [mailto:cygwin AT cygwin DOT com] > Sent: Thursday, February 22, 2001 5:27 PM > To: cygwin > Subject: Re: [ANNOUNCEMENT]: Important change to symbolic link > functionality > > > On Thu, Feb 22, 2001 at 03:26:05PM +0300, Egor Duda wrote: > > try this: > > > > ================================== > > cd /tmp > > mkdir -p symlink_test/1 > > mkdir -p symlink_test/2 > > touch symlink_test/1/1.fil > > touch symlink_test/2/2.fil > > cd symlink_test > > ln -s 1 t1 > > ln -s ../2 t1/new_2 > > cd /tmp > > mv symlink_test ~/ > > cd ~/symlink_test/t1/new_2 > > ls > > ================================== > > ls should show 2.fil > > > > now open /symlink_test/1/ with explorer and > oops, new_2 > > isn't shortcut anymore. > > You're right. This error is reproducable in Cygwin and U/WIN. > > However, I have just changed Cygwin to do it right ;-) > > The problem is that a shortcut has to contain a DOS path, obviously. > The new strategy is as follows: > > - If the target path is an absolute path save the absolute DOS path. > > - If the target doesn't exist save a relative DOS path (who cares?). > > - If the target path is accessible as relative DOS path save > that relative > DOS path. > > - If both of above fails save the absolute path. I don't really understand the last one; why if the target exist but is not accessible do you want to save it's absolute path rather than the relative one? AFAIRC the usual *NIX semantics is "save the target path as given, that is absolute if given absolute, relative otherwise). > > At least your above given example now works. > Corinna > Bernard -------------------------------------------- Bernard Dautrevaux Microprocess Ingenierie 97 bis, rue de Colombes 92400 COURBEVOIE FRANCE Tel: +33 (0) 1 47 68 80 80 Fax: +33 (0) 1 47 88 97 85 e-mail: dautrevaux AT microprocess DOT com b DOT dautrevaux AT usa DOT net -------------------------------------------- -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple