summaryrefslogtreecommitdiff
path: root/examples/sample-capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sample-capture.c')
-rw-r--r--examples/sample-capture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/sample-capture.c b/examples/sample-capture.c
index 952b434c7..a3a932871 100644
--- a/examples/sample-capture.c
+++ b/examples/sample-capture.c
@@ -77,7 +77,7 @@ capture_to_file(Camera *camera, GPContext *context, char *fn) {
printf("Pathname on the camera: %s/%s\n", camera_file_path.folder, camera_file_path.name);
- fd = open(fn, O_CREAT | O_WRONLY, 0644);
+ fd = open(fn, O_CREAT | O_WRONLY | O_BINARY, 0644);
retval = gp_file_new_from_fd(&file, fd);
printf(" Retval: %d\n", retval);
retval = gp_camera_file_get(camera, camera_file_path.folder, camera_file_path.name,