www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/12/23/09:01:32

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: symlink() bug + patch
References: <00F8D6E8AB0DD3118F1A006008186C9607C7EC AT server1 DOT axonet DOT com DOT au>
Mime-Version: 1.0 (generated by tm-edit 7.106)
From: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
Date: 23 Dec 1999 23:01:52 +0900
In-Reply-To: Andrew Dalgleish's message of Fri, 17 Dec 1999 19:03:12 +1100
Message-ID: <s1sd7rxiwmn.fsf@jaist.ac.jp>
Lines: 29
X-Mailer: Gnus v5.3/Emacs 19.34

>>> On Fri, 17 Dec 1999 19:03:12 +1100
>>> Andrew Dalgleish <andrewd AT axonet DOT com DOT au> said:

> There is a bug in symlink() if "path2" (SUSV2 docs) already exists.
> If path2 is already a symlink, then the target of that symlink is
> replaced instead of path2.
(snip)
> Here is a patch to make symlink() behave correctly.
> (ie return -1 and set errno to EEXIST)

This patch can't affect the case path2 is a symlink of which
target is lost. The following session in the latest snapshot is
almost the same as your example except for the initial `touch foo'.

$ ln -s foo bar
$ tar cf hum bar
$ ls -l
lrw-r--r--   1 fujieda  Domain U       14 Dec 23 22:49 bar -> foo
-rw-r--r--   1 fujieda  Domain U    10240 Dec 23 22:49 hum
$ tar xf hum
$ ls -l
lrw-r--r--   1 fujieda  Domain U       14 Dec 23 22:49 bar -> foo
lrw-r--r--   1 fujieda  Domain U       14 Dec 23 22:50 foo -> foo
-rw-r--r--   1 fujieda  Domain U    10240 Dec 23 22:49 hum

____
  | AIST      Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

- Raw text -


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