summaryrefslogtreecommitdiff
path: root/yavta.c
diff options
context:
space:
mode:
Diffstat (limited to 'yavta.c')
-rw-r--r--yavta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/yavta.c b/yavta.c
index 2e9561c..03fd98f 100644
--- a/yavta.c
+++ b/yavta.c
@@ -1065,7 +1065,7 @@ static void video_save_image(struct device *dev, struct v4l2_buffer *buf,
append = true;
}
- fd = open(filename, O_CREAT | O_WRONLY | (append ? O_APPEND : 0),
+ fd = open(filename, O_CREAT | O_WRONLY | (append ? O_APPEND : O_TRUNC),
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
free(filename);
if (fd == -1)