diff src/view_dir_list.c @ 44:458e396d3f35

Wed May 18 19:36:49 2005 John Ellis <johne@verizon.net> * utilops.[ch] (file_util_rename_dir): New utility to rename a folder, does proper checking for existing folder to avoid clobbering an existing folder. * view_dir_list.c, view_dir_tree.c: Use new utility above when renaming a folder to fix possible clobbering of an existing folder with the same name as the requested name. ##### Note: GQview CVS on sourceforge is not always up to date, please use ##### ##### an offical release when making enhancements and translation updates. #####
author gqview
date Wed, 18 May 2005 23:52:16 +0000
parents d907d608745f
children 04ff0df3ad2f
line wrap: on
line diff
--- a/src/view_dir_list.c	Mon May 16 01:49:51 2005 +0000
+++ b/src/view_dir_list.c	Wed May 18 23:52:16 2005 +0000
@@ -90,15 +90,7 @@
 	new_path = concat_dir_and_file(base, new);
 	g_free(base);
 
-	if (!rename_file(old_path, new_path))
-		{
-		gchar *buf;
-
-		buf = g_strdup_printf(_("Failed to rename %s to %s."), old, new);
-		file_util_warning_dialog("Rename failed", buf, GTK_STOCK_DIALOG_ERROR, vdl->listview);
-		g_free(buf);
-		}
-	else
+	if (file_util_rename_dir(old_path, new_path, vdl->listview))
 		{
 		if (vdl->layout && strcmp(vdl->path, old_path) == 0)
 			{