From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10121 invoked by alias); 14 Jan 2013 06:17:56 -0000 Received: (qmail 10110 invoked by uid 22791); 14 Jan 2013 06:17:54 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mho-03-ewr.mailhop.org (HELO mho-01-ewr.mailhop.org) (204.13.248.66) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Jan 2013 06:17:48 +0000 Received: from pool-98-110-183-21.bstnma.fios.verizon.net ([98.110.183.21] helo=cgf.cx) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1TudMi-0000Hm-4X for cygwin@cygwin.com; Mon, 14 Jan 2013 06:17:48 +0000 Received: from localhost (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id 5118E880383 for ; Mon, 14 Jan 2013 01:17:47 -0500 (EST) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+jC3l4oRter4j8lEp1Ap8q Date: Mon, 14 Jan 2013 06:17:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: stat() and tilde prefix (was bad bash tab completion) Message-ID: <20130114061747.GB16739@ednor.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <5024B4D4.6080409@shaddybaddah.name> <50F395D5.4050201@shaddybaddah.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50F395D5.4050201@shaddybaddah.name> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2013-01/txt/msg00171.txt.bz2 On Mon, Jan 14, 2013 at 04:21:25PM +1100, Shaddy Baddah wrote: >In investigating this, I believe the issue I am having is due to how >stat() handles tilde prefixed paths. On linux we see: > >linux$ $ python -c 'import os; print os.stat("~/..")' >Traceback (most recent call last): > File "", line 1, in >OSError: [Errno 2] No such file or directory: '~/..' > >and on cygwin we see: > >cygwin$ python -c 'import os; print os.stat("~/..")' >posix.stat_result(st_mode=16832, st_ino=562949953496729L, >st_dev=4174909669L, st_nlink=1, st_uid=42037, st_gid=10513, st_size=0L, >st_atime=1357616166, st_mtime=1357616166, st_ctime=1357616166) It is a bug. It's not just "~". Any nonexistent directory will work, like "foo/..". cgf -- 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