This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: stat() and tilde prefix (was bad bash tab completion)
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 14 Jan 2013 01:17:47 -0500
- Subject: Re: stat() and tilde prefix (was bad bash tab completion)
- References: <5024B4D4.6080409@shaddybaddah.name> <50F395D5.4050201@shaddybaddah.name>
- Reply-to: 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