changeset 947:368643594bc8

abort file operations when the file list is empty
author nadvornik
date Sun, 27 Jul 2008 19:22:40 +0000
parents 1d6e01950e85
children e3ca16c68ebd
files src/utilops.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/utilops.c	Sun Jul 27 18:20:59 2008 +0000
+++ b/src/utilops.c	Sun Jul 27 19:22:40 2008 +0000
@@ -1543,6 +1543,8 @@
 	if (source_fd)
 		flist = g_list_append(flist, file_data_ref(source_fd));
 
+	if (!flist) return;
+	
 	file_util_disable_grouping_sc_list(flist);
 	
 	if (!file_data_sc_add_ci_delete_list(flist))
@@ -1578,6 +1580,8 @@
 	if (source_fd)
 		flist = g_list_append(flist, file_data_ref(source_fd));
 
+	if (!flist) return;
+
 	file_util_disable_grouping_sc_list(flist);
 
 	if (!file_data_sc_add_ci_move_list(flist, dest_path))
@@ -1614,6 +1618,8 @@
 	if (source_fd)
 		flist = g_list_append(flist, file_data_ref(source_fd));
 
+	if (!flist) return;
+
 	file_util_disable_grouping_sc_list(flist);
 
 	if (!file_data_sc_add_ci_copy_list(flist, dest_path))
@@ -1651,6 +1657,8 @@
 	if (source_fd)
 		flist = g_list_append(flist, file_data_ref(source_fd));
 
+	if (!flist) return;
+
 	file_util_disable_grouping_sc_list(flist);
 
 	if (!file_data_sc_add_ci_rename_list(flist, dest_path))
@@ -1686,6 +1694,8 @@
 	if (source_fd)
 		flist = g_list_append(flist, file_data_ref(source_fd));
 
+	if (!flist) return;
+
 	file_util_disable_grouping_sc_list(flist);
 
 	if (!file_data_sc_add_ci_unspecified_list(flist, dest_path))