Mercurial > hg-stable
changeset 7140:beeeb0cd73e7
merge with crew
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 18 Oct 2008 21:11:44 +0200 |
parents | bcbba59e233d (current diff) 0c63b87d9bce (diff) |
children | 8d1bdaf842de |
files | |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/osutil.c Sat Oct 18 21:08:44 2008 +0200 +++ b/mercurial/osutil.c Sat Oct 18 21:11:44 2008 +0200 @@ -270,10 +270,13 @@ { PyObject *list, *elem, *stat, *ret = NULL; char fullpath[PATH_MAX + 10]; - int kind, dfd = -1, err; + int kind, err; struct stat st; struct dirent *ent; DIR *dir; +#ifdef AT_SYMLINK_NOFOLLOW + int dfd = -1; +#endif if (pathlen >= PATH_MAX) { PyErr_SetString(PyExc_ValueError, "path too long");
--- a/mercurial/util.py Sat Oct 18 21:08:44 2008 +0200 +++ b/mercurial/util.py Sat Oct 18 21:11:44 2008 +0200 @@ -865,7 +865,9 @@ # handle directory not found in Python version prior to 2.5 # Python <= 2.4 returns native Windows code 3 in errno # Python >= 2.5 returns ENOENT and adds winerror field - if err.errno not in (3, errno.ENOENT, errno.ENOTDIR): + # EINVAL is raised if dir is not a directory. + if err.errno not in (3, errno.ENOENT, errno.EINVAL, + errno.ENOTDIR): raise dmap = {} cache = dircache.setdefault(dir, dmap)