From d4504ff2f15951c610675e691d8bcd48986e3f89 Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Tue, 29 Oct 2024 11:50:58 +0000
Subject: [PATCH] [#438] FIX import-ldif --offline "import has been aborted because the entry does not have a parent entry" (#444)

---
 opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DnKeyFormat.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DnKeyFormat.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DnKeyFormat.java
index 5d4981e..cbd9503 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DnKeyFormat.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/DnKeyFormat.java
@@ -13,6 +13,7 @@
  *
  * Copyright 2006-2010 Sun Microsystems, Inc.
  * Portions Copyright 2014-2016 ForgeRock AS.
+ * Portions Copyright 2024 3A Systems, LLC.
  */
 package org.opends.server.backends.pluggable;
 
@@ -119,8 +120,8 @@
   static boolean isChild(ByteSequence parent, ByteSequence child)
   {
     if (child.length() <= parent.length()
-        || child.byteAt(parent.length()) != NORMALIZED_RDN_SEPARATOR
-        || !child.startsWith(parent))
+            || child.byteAt(parent.length()) != NORMALIZED_RDN_SEPARATOR
+            || !child.startsWith(parent))
     {
       return false;
     }
@@ -132,6 +133,9 @@
       {
         if (childSeparatorDetected)
         {
+          if (child.byteAt(i-1)==NORMALIZED_ESC_BYTE) {
+            continue;
+          }
           return false;
         }
         childSeparatorDetected = true;

--
Gitblit v1.10.0