Commit 49679b40 authored by Guido van Rossum's avatar Guido van Rossum

Oops, the previous patch contained a bug in chmod. Fixed now.

parent ffd15f52
...@@ -695,10 +695,10 @@ posix_chmod(self, args) ...@@ -695,10 +695,10 @@ posix_chmod(self, args)
char *path; char *path;
int i; int i;
int res; int res;
if (!PyArg_ParseTuple(args, format, &path, &i)) if (!PyArg_ParseTuple(args, "si", &path, &i))
return NULL; return NULL;
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
res = chmod(path, i); res = chmod(path, (mode_t)i);
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
if (res < 0) if (res < 0)
return posix_error_with_filename(path); return posix_error_with_filename(path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment