delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/22/11:30:54

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 22 Feb 2001 17:27:13 +0100
From: Corinna Vinschen <cygwin AT cygwin DOT com>
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: [ANNOUNCEMENT]: Important change to symbolic link functionality
Message-ID: <20010222172713.L908@cygbert.vinschen.de>
Mail-Followup-To: cygwin <cygwin AT cygwin DOT com>
References: <20010221232921 DOT X908 AT cygbert DOT vinschen DOT de> <21157045389 DOT 20010222102353 AT logos-m DOT ru> <20010222115142 DOT H908 AT cygbert DOT vinschen DOT de> <20010222120909 DOT I908 AT cygbert DOT vinschen DOT de> <180175177361 DOT 20010222152605 AT logos-m DOT ru>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <180175177361.20010222152605@logos-m.ru>; from deo@logos-m.ru on Thu, Feb 22, 2001 at 03:26:05PM +0300

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 <your_home_dir>/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.

At least your above given example now works.
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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