Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3C4EB7D2.5F49D736@windriver.com>
Date: Wed, 23 Jan 2002 14:17:06 +0100
From: Benoit Perrin <benoit.perrin@windriver.com>
Organization: Wind River Systems
X-Mailer: Mozilla 4.78 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Problem with symlink(2) (cygwin 1.3.9)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello,

I noticed a problem with the symlink(2) API, when windows shorcuts are
used to create the links.
If a directory contains a regular file or a directory (let's say
/foo/bar), when one uses the symlink(2) API to create a soft link with
the same name:

 ret = symlink("/tmp/entry", "/foo/bar");

the function does not return an error (ret==-1, errno==EEXIST). This is
because the node created has the real name "/foo/bar.lnk" and not
"/foo/bar". But the visual result of this problem is that doing a 'ls'
in "/foo" lists two entries with the same name, "/foo/bar".

Benoit

PS: The ln(1) command returns an error in such case, but it may perform
a stat(2) on the file before creating the link.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

