directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r796568 - /directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
Date Tue, 21 Jul 2009 22:18:52 GMT
Author: seelmann
Date: Tue Jul 21 22:18:51 2009
New Revision: 796568

URL: http://svn.apache.org/viewvc?rev=796568&view=rev
Log:
Fix for DIRSTUDIO-502 (Copy/Paste the context entry from one connection to another doesn't
work)

Modified:
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java?rev=796568&r1=796567&r2=796568&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
Tue Jul 21 22:18:51 2009
@@ -218,9 +218,14 @@
                 entryToCopy.getBrowserConnection().getAliasesDereferencingMethod(),
                 entryToCopy.getBrowserConnection().getReferralsHandlingMethod(), controls,
monitor, null );
 
+        // In case the parent is the RootDSE: use the parent DN of the old entry
+        LdapDN parentDn = parent.getDn();
+        if ( parentDn.isEmpty() )
+        {
+            parentDn = DnUtils.getParent( entryToCopy.getDn() );
+        }
         numberOfCopiedEntries = copyEntryRecursive( entryToCopy.getBrowserConnection(), result,
parent
-            .getBrowserConnection(), parent.getDn(), newRdn, scope, numberOfCopiedEntries,
dialog, dummyMonitor,
-            monitor );
+            .getBrowserConnection(), parentDn, newRdn, scope, numberOfCopiedEntries, dialog,
dummyMonitor, monitor );
 
         return numberOfCopiedEntries;
     }



Mime
View raw message