projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fe9cfc
)
mysql_selector: improve com_mv()
author
Andre
<maan@p133.(none)>
Tue, 11 Jul 2006 10:37:14 +0000
(12:37 +0200)
committer
Andre
<maan@p133.(none)>
Tue, 11 Jul 2006 10:37:14 +0000
(12:37 +0200)
Make it work in case basename(src) == basename(dest)
mysql_selector.c
patch
|
blob
|
history
diff --git
a/mysql_selector.c
b/mysql_selector.c
index 45a10bac0e9264e96b38dda81b7233370c02958e..51273644413ec0b67c4d100281857a023bac5d77 100644
(file)
--- a/
mysql_selector.c
+++ b/
mysql_selector.c
@@
-1505,7
+1505,7
@@
static int com_mv(__a_unused int fd, int argc, char *argv[])
goto out;
ret = -E_MYSQL_SYNTAX;
if (!strcmp(ebn1, ebn2))
- goto
out
;
+ goto
update_dir
;
remove_entry(argv[2]); /* no need to escape, ignore error */
q = make_message("update data set name = '%s' where name = '%s'",
ebn2, ebn1);
@@
-1522,6
+1522,7
@@
static int com_mv(__a_unused int fd, int argc, char *argv[])
free(q);
if (ret < 0)
goto out;
+update_dir:
ret = 1;
dn = para_dirname(argv[2]);
if (!dn)