Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49679b4

Browse files
committed
Oops, the previous patch contained a bug in chmod. Fixed now.
1 parent ffd15f5 commit 49679b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/posixmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,10 @@ posix_chmod(self, args)
695695
char *path;
696696
int i;
697697
int res;
698-
if (!PyArg_ParseTuple(args, format, &path, &i))
698+
if (!PyArg_ParseTuple(args, "si", &path, &i))
699699
return NULL;
700700
Py_BEGIN_ALLOW_THREADS
701-
res = chmod(path, i);
701+
res = chmod(path, (mode_t)i);
702702
Py_END_ALLOW_THREADS
703703
if (res < 0)
704704
return posix_error_with_filename(path);

0 commit comments

Comments
 (0)