projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b05e11
)
fixed in-place renaming
author
Vladimir Nadvornik
<nadvornik@suse.cz>
Sun, 22 Jun 2008 09:40:57 +0000
(09:40 +0000)
committer
Vladimir Nadvornik
<nadvornik@suse.cz>
Sun, 22 Jun 2008 09:40:57 +0000
(09:40 +0000)
src/view_file_list.c
patch
|
blob
|
history
diff --git
a/src/view_file_list.c
b/src/view_file_list.c
index
274da40
..
e067485
100644
(file)
--- a/
src/view_file_list.c
+++ b/
src/view_file_list.c
@@
-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);