Skip to content

Commit

Permalink
fixed in-place renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Jun 22, 2008
1 parent 5b05e11 commit 5a236ea
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/view_file_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,9 @@ static gint vflist_row_rename_cb(TreeEditData *td, const gchar *old, const gchar
}
else
{
gint row = vf_index_by_path(vf, old_path);
if (row >= 0)
{
GList *work = g_list_nth(vf->list, row);
FileData *fd = work->data;

file_util_rename_simple(fd, new_path, vf->listview);

}

FileData *fd = file_data_new_simple(old_path); /* get the fd from cache */
file_util_rename_simple(fd, new_path, vf->listview);
file_data_unref(fd);
}
g_free(old_path);
g_free(new_path);
Expand Down

0 comments on commit 5a236ea

Please sign in to comment.