mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
merge with crew
This commit is contained in:
commit
5cedefbd2a
@ -270,10 +270,13 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
|
||||
{
|
||||
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");
|
||||
|
@ -865,7 +865,9 @@ def _statfiles_clustered(files):
|
||||
# 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)
|
||||
|
Loading…
Reference in New Issue
Block a user