unix: Add O_WRONLY | O_CREAT to open call when opening file for append ("a").
To comply with Python semantics.
This commit is contained in:
parent
60ccb41fac
commit
63b9e598a3
@ -161,7 +161,7 @@ STATIC mp_obj_t fdfile_open(mp_obj_t type_in, mp_arg_val_t *args) {
|
|||||||
mode |= O_WRONLY | O_CREAT | O_TRUNC;
|
mode |= O_WRONLY | O_CREAT | O_TRUNC;
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
mode |= O_APPEND;
|
mode |= O_WRONLY | O_CREAT | O_APPEND;
|
||||||
break;
|
break;
|
||||||
case '+':
|
case '+':
|
||||||
mode |= O_RDWR;
|
mode |= O_RDWR;
|
||||||
|
Loading…
Reference in New Issue
Block a user