Skip to content

Commit

Permalink
fixed new folder command
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Jul 26, 2008
1 parent b90ac50 commit b2334b6
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/utilops.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,19 +872,22 @@ void file_util_check_ci(UtilityData *ud)
gint error = CHANGE_OK;
gchar *desc = NULL;

if (ud->dest_path && !isdir(ud->dest_path))
if (ud->type != UTILITY_TYPE_CREATE_FOLDER)
{
error = CHANGE_GENERIC_ERROR;
desc = g_strdup_printf(_("%s is not a directory"), ud->dest_path);
}
else if (ud->dir_fd)
{
error = file_data_sc_verify_ci(ud->dir_fd);
if (error) desc = file_data_get_error_string(error);
}
else
{
error = file_data_sc_verify_ci_list(ud->flist, &desc);
if (ud->dest_path && !isdir(ud->dest_path))
{
error = CHANGE_GENERIC_ERROR;
desc = g_strdup_printf(_("%s is not a directory"), ud->dest_path);
}
else if (ud->dir_fd)
{
error = file_data_sc_verify_ci(ud->dir_fd);
if (error) desc = file_data_get_error_string(error);
}
else
{
error = file_data_sc_verify_ci_list(ud->flist, &desc);
}
}

if (!error)
Expand Down

0 comments on commit b2334b6

Please sign in to comment.