mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
Fix modrdn, must also rename the directory if it exists.
This commit is contained in:
parent
b6d860f556
commit
fcc51c0497
1 changed files with 3 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue