This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new 2282310 system: nxrecorder: Add O_TRUNC when creating a file 2282310 is described below commit 2282310483f931844afd658ae76bb3918f64df62 Author: Masayuki Ishikawa <masayuki.ishik...@gmail.com> AuthorDate: Tue Jun 16 16:11:23 2020 +0900 system: nxrecorder: Add O_TRUNC when creating a file Signed-off-by: Masayuki Ishikawa <masayuki.ishik...@jp.sony.com> --- system/nxrecorder/nxrecorder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/nxrecorder/nxrecorder.c b/system/nxrecorder/nxrecorder.c index 85297b1..1768c16 100644 --- a/system/nxrecorder/nxrecorder.c +++ b/system/nxrecorder/nxrecorder.c @@ -847,7 +847,7 @@ int nxrecorder_recordraw(FAR struct nxrecorder_s *precorder, /* Test that the specified file exists */ - if ((precorder->fd = open(pfilename, O_WRONLY | O_CREAT)) == -1) + if ((precorder->fd = open(pfilename, O_WRONLY | O_CREAT | O_TRUNC)) == -1) { /* File not found. Test if its in the mediadir */