Mercurial > hg > forks > geeqie
changeset 850:128d1dc42c75
fixed in-place renaming
author | Vladimir Nadvornik <nadvornik@suse.cz> |
---|---|
date | Sun, 22 Jun 2008 09:40:57 +0000 |
parents | b6e76c0b52cd |
children | 3997609f8a48 |
files | src/view_file_list.c |
diffstat | 1 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/view_file_list.c Sun Jun 22 09:19:42 2008 +0000 +++ b/src/view_file_list.c Sun Jun 22 09:40:57 2008 +0000 @@ -428,16 +428,9 @@ } 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);