diff --git a/fs/vfs/fs_fcntl.c b/fs/vfs/fs_fcntl.c index 1f6f425eede..f796fa5b23a 100644 --- a/fs/vfs/fs_fcntl.c +++ b/fs/vfs/fs_fcntl.c @@ -150,6 +150,11 @@ static int file_vfcntl(FAR struct file *filep, int cmd, va_list ap) oflags &= (FFCNTL & ~O_NONBLOCK); filep->f_oflags &= ~(FFCNTL & ~O_NONBLOCK); filep->f_oflags |= oflags; + + if (filep->f_oflags & O_APPEND) + { + file_seek(filep, 0, SEEK_END); + } } } break;