summaryrefslogtreecommitdiff
path: root/libgphoto2/gphoto2-file.c
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2009-10-11 11:35:03 +0000
committerMarcus Meissner <marcus@jet.franken.de>2009-10-11 11:35:03 +0000
commit6a251848d1235c9c9361408222a795b6c254149d (patch)
treea365b40bb789e0be99980299b2814b24b9309778 /libgphoto2/gphoto2-file.c
parent729c77bda0bfac411a15752f6d571eba7366ce28 (diff)
downloadlibgphoto2-6a251848d1235c9c9361408222a795b6c254149d.tar.gz
fixed 1 ftrucnate
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12489 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2/gphoto2-file.c')
-rw-r--r--libgphoto2/gphoto2-file.c3
1 files changed, 2 insertions, 1 deletions
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) {