Skip to content
Snippets Groups Projects
Commit 63b9e598 authored by Ari Suutari's avatar Ari Suutari Committed by Paul Sokolovsky
Browse files

unix: Add O_WRONLY | O_CREAT to open call when opening file for append ("a").

To comply with Python semantics.
parent 60ccb41f
Branches
No related tags found
No related merge requests found
......@@ -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;
break;
case 'a':
mode |= O_APPEND;
mode |= O_WRONLY | O_CREAT | O_APPEND;
break;
case '+':
mode |= O_RDWR;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment