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
......@@ -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;
......
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