summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--unix/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/file.c b/unix/file.c
index dfe2d6e113..a7886fd3ce 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -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;