From 0b5edae92f037b1e156a37ba3d7d9a2c95f58dd4 Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 11 Jul 2006 12:37:14 +0200 Subject: [PATCH] mysql_selector: improve com_mv() Make it work in case basename(src) == basename(dest) --- mysql_selector.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql_selector.c b/mysql_selector.c index 45a10bac..51273644 100644 --- 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) -- 2.39.5