delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
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 |
X-Mail-Handler: | Dyn Standard SMTP by Dyn |
X-Report-Abuse-To: | abuse AT dyndns DOT 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 01:17:47 -0500 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: stat() and tilde prefix (was bad bash tab completion) |
Message-ID: | <20130114061747.GB16739@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <5024B4D4 DOT 6080409 AT shaddybaddah DOT name> <50F395D5 DOT 4050201 AT shaddybaddah DOT name> |
MIME-Version: | 1.0 |
In-Reply-To: | <50F395D5.4050201@shaddybaddah.name> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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 "<string>", line 1, in <module> >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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |