Index: libgthumb/file-utils.h
===================================================================
--- libgthumb/file-utils.h	(revision 2392)
+++ libgthumb/file-utils.h	(working copy)
@@ -135,8 +135,7 @@
 gboolean            local_file_move               (const char       *from,
 						   const char       *to);
 gboolean            file_rename                   (const char       *old_path,
-						   const char       *new_path,
-						   GError          **error);
+						   const char       *new_path);
 gboolean            file_unlink                   (const char       *path);
 void		    delete_thumbnail	          (const char       *path);
 gboolean            mime_type_is                  (const char       *mime_type,
Index: libgthumb/gfile-utils.c
===================================================================
--- libgthumb/gfile-utils.c	(revision 2392)
+++ libgthumb/gfile-utils.c	(working copy)
@@ -92,7 +92,11 @@
 	char *warning;
 	
 	uri = gfile_get_uri (file);
-	warning = g_strdup_printf ("%s: file %s: %s\n", msg, uri, err->message);
+	
+	if (err == NULL)
+		warning = g_strdup_printf ("%s: file %s\n", msg, uri);
+	else
+		warning = g_strdup_printf ("%s: file %s: %s\n", msg, uri, err->message);
 	
 	g_warning (warning);
 	
@@ -518,3 +522,63 @@
 
 	return result;
 }
+
+
+/* Xfer */
+
+
+/* empty functions */
+static void _empty_file_progress_cb  (goffset current_num_bytes,
+				      goffset total_num_bytes,
+				      gpointer user_data)
+{
+}
+
+gboolean
+gfile_xfer (GFile    *sfile,
+	    GFile    *dfile,
+	    gboolean  move)
+{
+	GError *error = NULL;
+
+	if (g_file_equal (sfile, dfile)) {
+		gfile_warning ("cannot copy file: source and destination are the same", 
+			       sfile, 
+			       NULL);
+		return FALSE;
+	}
+
+	if (move)
+		g_file_move (sfile, dfile,
+			     G_FILE_COPY_OVERWRITE,
+			     NULL, _empty_file_progress_cb,
+			     NULL, &error);
+	else
+		g_file_copy (sfile, dfile,
+			     G_FILE_COPY_OVERWRITE,
+			     NULL, _empty_file_progress_cb,
+			     NULL, &error);
+	
+	if (error != NULL) {
+		gfile_warning ("error during file copy", sfile, error);
+		g_error_free (error);
+		return FALSE;
+	}
+	
+	return TRUE;
+}
+
+
+gboolean
+gfile_copy (GFile *sfile,
+	    GFile *dfile)
+{
+	return gfile_xfer (sfile, dfile, FALSE);
+}
+
+gboolean
+gfile_move (GFile *sfile,
+	    GFile *dfile)
+{
+	return gfile_xfer (sfile, dfile, TRUE);
+}
Index: libgthumb/gfile-utils.h
===================================================================
--- libgthumb/gfile-utils.h	(revision 2392)
+++ libgthumb/gfile-utils.h	(working copy)
@@ -79,6 +79,16 @@
 GFile *       gfile_get_home_dir               (void);
 GFile *       gfile_get_tmp_dir                (void);
 GFile *       gfile_get_temp_dir_name          (void);
-gboolean      gfile_dir_remove_recursive       (GFile *dir);
+gboolean      gfile_dir_remove_recursive       (GFile      *dir);
+
+/* Xfer */
+
+gboolean      gfile_xfer                       (GFile      *sfile,
+		                                GFile      *dfile,
+		                                gboolean    move);
+gboolean      gfile_copy                       (GFile      *sfile,
+		                                GFile      *dfile);
+gboolean      gfile_move                       (GFile      *sfile,
+		                                GFile      *dfile);
 
 #endif /* GFILE_UTILS_H */
Index: libgthumb/file-utils.c
===================================================================
--- libgthumb/file-utils.c	(revision 2392)
+++ libgthumb/file-utils.c	(working copy)
@@ -68,12 +68,6 @@
 #define CHUNK_SIZE 128
 #define MAX_SYMLINKS_FOLLOWED 32
 
-/* empty functions */
-static void _empty_file_progress_cb  (goffset current_num_bytes,
-				      goffset total_num_bytes,
-				      gpointer user_data)
-{
-}
 
 /* Async directory list */
 
@@ -737,26 +731,14 @@
 	   const char *to,
 	   gboolean    move)
 {
-	GError        *ioerror = NULL;
-	GFile         *sfile, *dfile;
-
-	if (same_uri (from, to)) {
-		g_warning ("cannot copy file %s: source and destination are the same\n", from);
-		return FALSE;
-	}
+	GFile      *sfile;
+	GFile      *dfile;
+	gboolean    result;
 
 	sfile = gfile_new (from);
 	dfile = gfile_new (to);
-	if (move)
-		g_file_move (sfile, dfile,
-			     G_FILE_COPY_OVERWRITE,
-			     NULL, _empty_file_progress_cb,
-			     NULL, &ioerror);
-	else
-		g_file_copy (sfile, dfile,
-			     G_FILE_COPY_OVERWRITE,
-			     NULL, _empty_file_progress_cb,
-			     NULL, &ioerror);
+	
+	result = gfile_xfer (sfile, dfile, move);
 
 	g_object_unref (sfile);
 	g_object_unref (dfile);
@@ -761,11 +743,7 @@
 	g_object_unref (sfile);
 	g_object_unref (dfile);
 	
-	if (ioerror) {
-		g_error_free (ioerror);
-		return FALSE;
-	} else
-		return TRUE;
+	return result;
 }
 
 
@@ -792,29 +770,11 @@
 	return xfer_file (from, to, TRUE);
 }
 
-
-gboolean 
-file_rename (const char  *old_path,
-	     const char  *new_path,
-	     GError     **error)
+gboolean
+file_rename (const char *from,
+	     const char *to)
 {
-	GFile *sfile, *dfile;
-	GError *err = NULL;
-	gboolean result;
-	sfile = gfile_new (old_path);
-	dfile = gfile_new (new_path);
-
-	result = g_file_move (sfile, dfile,
-                              G_FILE_COPY_OVERWRITE,
-                              NULL,
-			      _empty_file_progress_cb,
-			      NULL, &err);
-	if (err)
-		g_propagate_error (error, err);
-	
-	g_object_unref (sfile);
-	g_object_unref (dfile);
-	return result;
+	return xfer_file (from, to, TRUE);
 }
 
 
Index: src/catalog-web-exporter.c
===================================================================
--- src/catalog-web-exporter.c	(revision 2392)
+++ src/catalog-web-exporter.c	(working copy)
@@ -2135,57 +2135,95 @@
 static void
 export__save_other_files (CatalogWebExporter *ce)
 {
-	GnomeVFSResult  result;
-	GList          *file_list = NULL;
-	char           *uri;
+	GFileEnumerator  *file_enum;
+	GError           *error = NULL;
 		
-	uri = gfile_get_uri (ce->style_dir);
-	result = gnome_vfs_directory_list_load (&file_list, uri, GNOME_VFS_FILE_INFO_DEFAULT);
+	file_enum = g_file_enumerate_children (ce->style_dir,
+					       G_FILE_ATTRIBUTE_STANDARD_NAME ","
+					       G_FILE_ATTRIBUTE_STANDARD_TYPE,
+					       0, NULL, &error);
+
+	if (error != NULL) {
+		gfile_warning ("Cannot enumerate style directory", 
+			       ce->style_dir, 
+			       error);
+		g_error_free (error);
+	}
+	else {
+		GList *source_uri_list = NULL;
+		GList *target_uri_list = NULL;
 		
-	g_free (uri);
-
-	if (result == GNOME_VFS_OK) {
-		GList *scan;
-		GList *source_uri_list = NULL, *target_uri_list =  NULL;
-
-		for (scan = file_list; scan; scan = scan->next) {
-			GnomeVFSFileInfo *info = scan->data;
-			char		 *target_filename, *source_filename;
-			GFile            *source_file, *target_file;
-			GnomeVFSURI	 *source_uri = NULL, *target_uri = NULL;
-
-			if (info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
-				continue;
-
-			if ((strcmp (info->name, "index.gthtml") == 0)
-			    || (strcmp (info->name, "thumbnail.gthtml") == 0)
-			    || (strcmp (info->name, "image.gthtml") == 0))
-				continue;
-
-			source_file = gfile_append_path (ce->style_dir,
-							 info->name,
-							 NULL);
-			target_file = get_theme_file (ce, 
-					              ce->target_tmp_dir,
-					              info->name);
-
-			source_filename = gfile_get_uri (source_file);
-			source_uri = gnome_vfs_uri_new (source_filename);
+		gboolean enumerate = TRUE;
+		
+		while (enumerate) {
+	
+			GFileInfo        *info;
+	
+			info = g_file_enumerator_next_file (file_enum, NULL, &error);
+			
+			/* error during enumeration */
+			
+			if (error != NULL) {
+				gfile_warning ("Error during enumeration of style directory", 
+					       ce->style_dir, 
+					       error);
+				g_error_free (error);
+				enumerate = FALSE;
+			}
+			
+			/* no more files */
 			
-			target_filename = gfile_get_uri (target_file);
-			target_uri = gnome_vfs_uri_new (target_filename);
+			else if (info == NULL) {
+				enumerate = FALSE;
+			}
 			
-			source_uri_list = g_list_prepend (source_uri_list, source_uri);
-			target_uri_list = g_list_prepend (target_uri_list, target_uri);
-
-			gfile_debug (DEBUG_INFO, "save file", source_file);
-
-			g_free (source_filename);
-			g_free (target_filename);
-			g_object_unref (source_file);
-			g_object_unref (target_file);
+			/* OK, got a file */
+			
+			else {
+				const char       *name;
+				char		 *target_filename, *source_filename;
+				GFile            *source_file, *target_file;
+				GnomeVFSURI	 *source_uri = NULL, *target_uri = NULL;
+				
+				if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
+					continue;
+		
+				name = g_file_info_get_name (info);
+				
+				if ((strcmp (name, "index.gthtml") == 0)
+				    || (strcmp (name, "thumbnail.gthtml") == 0)
+				    || (strcmp (name, "image.gthtml") == 0))
+					continue;
+		
+				source_file = gfile_append_path (ce->style_dir,
+								 name,
+								 NULL);
+				target_file = get_theme_file (ce, 
+							      ce->target_tmp_dir,
+							      name);
+		
+				source_filename = gfile_get_uri (source_file);
+				source_uri = gnome_vfs_uri_new (source_filename);
+				
+				target_filename = gfile_get_uri (target_file);
+				target_uri = gnome_vfs_uri_new (target_filename);
+				
+				source_uri_list = g_list_prepend (source_uri_list, source_uri);
+				target_uri_list = g_list_prepend (target_uri_list, target_uri);
+		
+				gfile_debug (DEBUG_INFO, "save file", source_file);
+		
+				g_free (source_filename);
+				g_free (target_filename);
+				g_object_unref (source_file);
+				g_object_unref (target_file);
+				
+				g_object_unref (info);
+			}
 		}
 		
+		g_object_unref (file_enum);
+		
 		if (source_uri_list != NULL) {
 			
 			GnomeVFSXferOptions        xfer_options;
@@ -2196,9 +2234,9 @@
 			xfer_options    = 0;
 			xfer_error_mode = GNOME_VFS_XFER_ERROR_MODE_ABORT;
 			overwrite_mode  = GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE;
-
+	
 			result = gnome_vfs_xfer_uri_list (source_uri_list,
-				       			  target_uri_list,
+							  target_uri_list,
 							  xfer_options,
 							  xfer_error_mode,
 							  overwrite_mode,
@@ -2203,7 +2241,7 @@
 							  xfer_error_mode,
 							  overwrite_mode,
 							  export__save_other_files__progress_update_cb,
-				 			  ce);
+							  ce);
 		}
 		
 		if (source_uri_list != NULL)
@@ -2211,9 +2249,6 @@
 		if (target_uri_list != NULL)
 			gnome_vfs_uri_list_free (target_uri_list);
 	}
-
-	if (file_list != NULL)
-		gnome_vfs_file_info_list_free (file_list);
 }
 
 
@@ -2606,12 +2641,10 @@
 static void
 export__copy_image (CatalogWebExporter *ce)
 {
-	ImageData                 *idata;
-	GFile                     *file;
-	char                      *uri;
-	GnomeVFSURI               *source_uri = NULL;
-	GnomeVFSURI               *target_uri = NULL;
-	GnomeVFSResult             result;
+	ImageData  *idata;
+	GFile      *sfile;
+	GFile      *dfile;
+	gboolean   *copy_done;
 
 	/* This function is used when "Copy originals to destination" is
 	   enabled, and resizing is NOT enabled. This allows us to use a
@@ -2622,26 +2655,18 @@
 
 	idata = ce->file_to_load->data;
 
-	source_uri = gnome_vfs_uri_new (idata->src_file->path);
+	sfile = gfile_new (idata->src_file->path);
 	
-	file = get_image_file (ce, 
-			       idata, 
-			       ce->target_tmp_dir);
-	uri = gfile_get_uri (file);
-	target_uri = gnome_vfs_uri_new (uri);
+	dfile = get_image_file (ce, 
+			        idata, 
+			        ce->target_tmp_dir);
 		
-	result = gnome_vfs_xfer_uri (source_uri,
-				     target_uri,
-				     GNOME_VFS_XFER_DEFAULT,
-				     GNOME_VFS_XFER_ERROR_MODE_ABORT,
-				     GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
-				     NULL,
-				     NULL);
+	copy_done = gfile_copy (sfile, dfile);
 
-	gnome_vfs_uri_unref (source_uri);
-	gnome_vfs_uri_unref (target_uri);
-
-	if (result == GNOME_VFS_OK) {
+	if (copy_done) {
+		char *uri;
+		uri = gfile_get_uri (dfile);
+		
 		if (image_is_jpeg (uri)) {
 			GthTransform  transform;
 		
@@ -2658,10 +2683,11 @@
 
 			file_data_unref (fd);
 		}
+		g_free (uri);
 	}
 	
-	g_object_unref (file);
-	g_free (uri);
+	g_object_unref (sfile);
+	g_object_unref (dfile);
 	
 	ce->saving_timeout = g_timeout_add (SAVING_TIMEOUT,
 					    save_image_preview_cb,
Index: src/gth-browser-actions-callbacks.c
===================================================================
--- src/gth-browser-actions-callbacks.c	(revision 2392)
+++ src/gth-browser-actions-callbacks.c	(working copy)
@@ -509,7 +509,7 @@
 				       _("The name \"%s\" is already used. " "Please use a different name."), utf8_name);
 		g_free (utf8_name);
 	} 
-	else if (file_rename (catalog_path, new_catalog_path, NULL)) {
+	else if (file_rename (catalog_path, new_catalog_path)) {
 		all_windows_notify_catalog_rename (catalog_path,
 						   new_catalog_path);
 	} 
@@ -1031,7 +1031,7 @@
 
 		old_folder_comment = comments_get_comment_filename (old_path, TRUE);
 
-		result = file_rename (old_path, new_path, NULL);
+		result = file_rename (old_path, new_path);
 		if (result) {
 			char *new_folder_comment;
 
@@ -1038,7 +1038,7 @@
 			/* Comment cache. */
 
 			new_folder_comment = comments_get_comment_filename (new_path, TRUE);
-			file_rename (old_folder_comment, new_folder_comment, NULL);
+			file_rename (old_folder_comment, new_folder_comment);
 			g_free (new_folder_comment);
 
 			all_windows_notify_directory_rename (old_path, new_path);
@@ -1341,7 +1341,7 @@
 
 		old_folder_comment = comments_get_comment_filename (old_path, TRUE);
 
-		result = file_rename (old_path, new_path, NULL);
+		result = file_rename (old_path, new_path);
 		if (result) {
 			char *new_folder_comment;
 
@@ -1349,7 +1349,7 @@
 			 * implemeted with rename, which is faster. */
 
 			new_folder_comment = comments_get_comment_filename (new_path, TRUE);
-			file_rename (old_folder_comment, new_folder_comment, NULL);
+			file_rename (old_folder_comment, new_folder_comment);
 			g_free (new_folder_comment);
 
 			all_windows_notify_directory_rename (old_path, new_path);
Index: src/dlg-file-utils.c
===================================================================
--- src/dlg-file-utils.c	(revision 2392)
+++ src/dlg-file-utils.c	(working copy)
@@ -1005,7 +1005,7 @@
 			continue;
 		}
 
-		result = file_rename (old_full_path, new_full_path, NULL);
+		result = file_rename (old_full_path, new_full_path);
 		if (result) {
 			cache_move (old_full_path, new_full_path);
 			comment_move (old_full_path, new_full_path);

