comparison src/utilops.c @ 935:ae641f36159d

fixed new folder command
author nadvornik
date Sat, 26 Jul 2008 19:41:46 +0000
parents 6aa60ae6f274
children f5b874c94796
comparison
equal deleted inserted replaced
934:6aa60ae6f274 935:ae641f36159d
870 void file_util_check_ci(UtilityData *ud) 870 void file_util_check_ci(UtilityData *ud)
871 { 871 {
872 gint error = CHANGE_OK; 872 gint error = CHANGE_OK;
873 gchar *desc = NULL; 873 gchar *desc = NULL;
874 874
875 if (ud->dest_path && !isdir(ud->dest_path)) 875 if (ud->type != UTILITY_TYPE_CREATE_FOLDER)
876 { 876 {
877 error = CHANGE_GENERIC_ERROR; 877 if (ud->dest_path && !isdir(ud->dest_path))
878 desc = g_strdup_printf(_("%s is not a directory"), ud->dest_path); 878 {
879 } 879 error = CHANGE_GENERIC_ERROR;
880 else if (ud->dir_fd) 880 desc = g_strdup_printf(_("%s is not a directory"), ud->dest_path);
881 { 881 }
882 error = file_data_sc_verify_ci(ud->dir_fd); 882 else if (ud->dir_fd)
883 if (error) desc = file_data_get_error_string(error); 883 {
884 } 884 error = file_data_sc_verify_ci(ud->dir_fd);
885 else 885 if (error) desc = file_data_get_error_string(error);
886 { 886 }
887 error = file_data_sc_verify_ci_list(ud->flist, &desc); 887 else
888 {
889 error = file_data_sc_verify_ci_list(ud->flist, &desc);
890 }
888 } 891 }
889 892
890 if (!error) 893 if (!error)
891 { 894 {
892 ud->phase = UTILITY_PHASE_CHECKED; 895 ud->phase = UTILITY_PHASE_CHECKED;