X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:content-transfer-encoding:content-type:from
	:mime-version:subject:message-id:date:to; q=dns; s=default; b=Xx
	kgwISnFcT21qypMHipoi5mqU+axa+7/UldyuA9/CkIedt1P26GdTnkOoqWlsLhoq
	WhQ19HTi1zDWf9uMlB7n6hXXEOVg2OaEFkzAx5mFYNZgJAJYel1XE6yq+oLD46TM
	DTS+rnOYJ1UqdcKFSYnsd9mqDa3ta7NAkc5j5x/Ao=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:content-transfer-encoding:content-type:from
	:mime-version:subject:message-id:date:to; s=default; bh=mPF/XJS+
	siwkNO12Q2jMz6BIkE4=; b=iOrcAa4tRiMAlXAt3ISNaiV5KDALnXk5laln6kKy
	Ym8O85nd93UK7SV1cFU3kA6hEvj4NSHbKpS2MrmuecIiVjfc+z0Jl8bOXJHD2ZV9
	E1o6agK19wsqmUGBqa3gpS0AfX3NFUo8nkiwucuRXyZNCVoBcF1XAhwj04uTeH6a
	ysE=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM,MALFORMED_FREEMAIL,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2
X-HELO: st11p02im-asmtp002.me.com
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-10-23_02:,, signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=1 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510090000 definitions=main-1510230041
Content-type: text/plain; charset=us-ascii
From: "Mark O'Keefe" <mark_okeefe@mac.com>
MIME-version: 1.0 (1.0)
Subject: BUG:  /bin/pwd -P doesn't expand all symlinks
Message-id: <A209F3EB-2FC6-42AB-A4E0-B5A88C53DF4A@mac.com>
Date: Fri, 23 Oct 2015 13:40:17 +1100
To: cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t9N2ek0M030439

Hi,

While using /bin/pwd -P to expand directories to get the absolute, non-symlinked version of the directory I discovered that this doesn't work on Cygwin as I believe it is meant to work.


$ cd /tmp
$ /bin/pwd -P
/tmp
$ ln -s /home .
$ cd home
$ /bin/pwd -P
/home
$ pwd
/tmp/home
$ mkdir dummy
$ cd dummy
$ pwd
/tmp/home/dummy
$ /bin/pwd -P
/tmp/home/dummy

NOTE:  That last command should have returned "/home/dummy".  It hasn't expanded the parent symbolic link as you would have expected it to do.

For what I'm doing I need the physical path, not the symbolic path (which is what the -P is meant to provide).

Please confirm if I'm correct in my understanding?  I've tested this on Ubuntu and it works as I'd expect it...

Now having to create an alternative approach to get the correct answer while I wait for this to be fixed (assuming it is a bug as I believe it is).

Thanks in advance for any help in resolving this.

Cheers,
Mark.

--
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


