[issue1117601] os.path.exists returns false negatives in MAC environments.

Virgil Dupras report at bugs.python.org
Fri Aug 8 11:26:55 CEST 2008


Virgil Dupras <hsoft at hardcoded.net> added the comment:

hsoft-dev:~ hsoft$ mkdir foobar
hsoft-dev:~ hsoft$ echo "baz" > foobar/baz
hsoft-dev:~ hsoft$ chmod 000 foobar/baz
hsoft-dev:~ hsoft$ python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os.path
>>> os.path.exists('foobar/baz')
True
>>> 
hsoft-dev:~ hsoft$ chmod 000 foobar
hsoft-dev:~ hsoft$ python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os.path
>>> os.path.exists('foobar/baz')
False
>>> os.path.exists('foobar')
True
>>> 

This seems like the correct behavior to me.

----------
nosy: +vdupras

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1117601>
_______________________________________


More information about the Python-bugs-list mailing list