diff --git a/ChangeLog b/ChangeLog index ce11e3518..24df7997b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-11-06 Lutz Müller + + * libgphoto2/gphoto2-filesys.c: Don't trust the camera libraries, + set name, type, and adjust name for mime type after getting a file. + 2001-11-06 Lutz Müller Chris Pinkham decoded the thumbnails: diff --git a/libgphoto2/gphoto2-filesys.c b/libgphoto2/gphoto2-filesys.c index df9feed4f..cbed45c5a 100644 --- a/libgphoto2/gphoto2-filesys.c +++ b/libgphoto2/gphoto2-filesys.c @@ -1227,8 +1227,12 @@ gp_filesystem_get_file (CameraFilesystem *fs, const char *folder, return (GP_ERROR); } + /* We don't trust the camera drivers */ CHECK_RESULT (gp_file_set_type (tmp, type)); - CHECK_RESULT (gp_file_set_name (tmp, filename)); + CHECK_RESULT (gp_file_set_name (tmp, filename)); + CHECK_RESULT (gp_file_adjust_name_for_mime_type (tmp)); + + /* Remember the file (cache) */ CHECK_RESULT (gp_file_copy (file, tmp)); return (GP_OK);