From 6a251848d1235c9c9361408222a795b6c254149d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 11 Oct 2009 11:35:03 +0000 Subject: fixed 1 ftrucnate git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12489 67ed7778-7388-44ab-90cf-0a291f65f57c --- libgphoto2/gphoto2-file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libgphoto2/gphoto2-file.c') diff --git a/libgphoto2/gphoto2-file.c b/libgphoto2/gphoto2-file.c index 78df91499..5b3f08b80 100644 --- a/libgphoto2/gphoto2-file.c +++ b/libgphoto2/gphoto2-file.c @@ -832,7 +832,8 @@ gp_file_copy (CameraFile *destination, CameraFile *source) char *data; lseek (destination->fd, 0, SEEK_SET); - ftruncate (destination->fd, 0); + if (-1 == ftruncate (destination->fd, 0)) + perror("ftruncate"); lseek (source->fd, 0, SEEK_SET); data = malloc (65536); while (1) { -- cgit v1.2.1