Fix modrdn, must also rename the directory if it exists.

This commit is contained in:
Howard Chu 2006-12-24 00:54:14 +00:00
parent b6d860f556
commit fcc51c0497

View file

@ -971,6 +971,9 @@ static int move_entry(Entry * entry, struct berval * ndn,
if(res != -1) {
/* if this fails we should log something bad */
res = unlink(path.bv_val);
path.bv_val[path.bv_len - STRLENOF(".ldif")] = '\0';
newpath.bv_val[newpath.bv_len - STRLENOF(".ldif")] = '\0';
res = rename(path.bv_val, newpath.bv_val);
res = LDAP_SUCCESS;
}
else {