Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
82089674
Commit
82089674
authored
Jun 11, 2014
by
Damien George
Browse files
stmhal, file: Seek to end of file if opened in 'a' mode.
parent
b7572ad1
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/file.c
View file @
82089674
...
...
@@ -202,6 +202,11 @@ STATIC mp_obj_t file_obj_make_new(mp_obj_t type, uint n_args, uint n_kw, const m
nlr_raise
(
mp_obj_new_exception_arg1
(
&
mp_type_OSError
,
MP_OBJ_NEW_SMALL_INT
((
machine_int_t
)
fresult_to_errno_table
[
res
])));
}
// for 'a' mode, we must begin at the end of the file
if
((
mode
&
FA_OPEN_ALWAYS
)
!=
0
)
{
f_lseek
(
&
o
->
fp
,
f_size
(
&
o
->
fp
));
}
return
o
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment