diff --git a/libgphoto2/file.c b/libgphoto2/file.c index 00a3a1ac5..ed86b3471 100644 --- a/libgphoto2/file.c +++ b/libgphoto2/file.c @@ -136,7 +136,7 @@ int gp_file_open (CameraFile *file, char *filename) { /* needs MIME lookup!! */ dot = strrchr(filename, '.'); if (dot) - sprintf(file->type, "image/%s", dot); + sprintf(file->type, "image/%s", dot + 1); else strcpy(file->type, "image/unknown");