You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/06/16 09:00:33 UTC
[incubator-nuttx-apps] branch master updated: system: nxrecorder:
Add O_TRUNC when creating a file
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 <ma...@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 <Ma...@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 */