Index: daemon/gvfsbackendgphoto2.c
===================================================================
--- daemon/gvfsbackendgphoto2.c.orig
+++ daemon/gvfsbackendgphoto2.c
@@ -1647,7 +1647,7 @@ do_mount (GVfsBackend *backend,
       return;
     }
 
-  DEBUG ("  '%s' '%s' '%s'",  info.name, info.path, info.library_filename);
+  /*DEBUG ("  '%s' '%s' '%s'",  info.name, info.path, info.library_filename);*/
   
   /* set port */
   rc = gp_camera_set_port_info (gphoto2_backend->camera, info);
@@ -2590,7 +2590,11 @@ do_slow_file_rename_in_same_dir (GVfsBac
         }
     }
 
+#ifdef HAVE_GPHOTO25
+  rc = gp_camera_folder_put_file (gphoto2_backend->camera, dir, new_name, GP_FILE_TYPE_NORMAL, file_dest, gphoto2_backend->context);
+#else
   rc = gp_camera_folder_put_file (gphoto2_backend->camera, dir, file_dest, gphoto2_backend->context);
+#endif
   if (rc != 0)
     goto out;
 
@@ -3222,14 +3226,18 @@ commit_write_handle (GVfsBackendGphoto2
   if (rc != 0)
     goto out;
 
-  gp_file_set_type (file, GP_FILE_TYPE_NORMAL);
   gp_file_set_name (file, write_handle->name);
   gp_file_set_mtime (file, time (NULL));
   gp_file_set_data_and_size (file, 
                              dup_for_gphoto2 (write_handle->data, write_handle->size), 
                              write_handle->size);
   
+#ifdef HAVE_GPHOTO25
+  rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, write_handle->name, GP_FILE_TYPE_NORMAL, file, gphoto2_backend->context);
+#else
+  gp_file_set_type (file, GP_FILE_TYPE_NORMAL);
   rc = gp_camera_folder_put_file (gphoto2_backend->camera, write_handle->dir, file, gphoto2_backend->context);
+#endif
   if (rc != 0)
     {
       gp_file_unref (file);
Index: configure.ac
===================================================================
--- configure.ac.orig
+++ configure.ac
@@ -397,6 +397,9 @@ if test "x$enable_gphoto2" != "xno" -a \
     if test "x$use_gphoto2" = "xyes"; then
       PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.4.0)
       AC_DEFINE(HAVE_GPHOTO2, 1, [Define to 1 if gphoto2 is available])
+      PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= 2.5.0,
+         AC_DEFINE(HAVE_GPHOTO25, 1, [Define to 1 if libgphoto2 2.5 is available])
+      )
     else
       AC_MSG_WARN([Not building with gphoto2 support. Need OS tweaks in hal volume monitor.])
       msg_gphoto2=no
