You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/09/27 11:23:34 UTC
svn commit: r1001641 -
/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
Author: kayyagari
Date: Mon Sep 27 09:23:33 2010
New Revision: 1001641
URL: http://svn.apache.org/viewvc?rev=1001641&view=rev
Log:
o setting partition and working directories
Modified:
directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java?rev=1001641&r1=1001640&r2=1001641&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java (original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java Mon Sep 27 09:23:33 2010
@@ -123,6 +123,10 @@ public class SingleFileLdifPartition ext
{
ldifFile = new RandomAccessFile( file, "rws" );
fileName = file;
+
+ File partitionDir = new File( file ).getParentFile();
+ setPartitionDir( partitionDir );
+ setWorkingDirectory( partitionDir.getAbsolutePath() );
}
catch ( IOException e )
{
@@ -164,6 +168,28 @@ public class SingleFileLdifPartition ext
}
+ @Override
+ public void setPartitionDir( File partitionDir )
+ {
+ // partition directory will always be the directory
+ // in which the backing LDIF file is present
+ if( getPartitionDir() != null )
+ {
+ super.setPartitionDir( partitionDir );
+ }
+ }
+
+
+ @Override
+ public void setWorkingDirectory( String workingDirectory )
+ {
+ if( getWorkingDirectory() != null )
+ {
+ super.setWorkingDirectory( workingDirectory );
+ }
+ }
+
+
/**
* load the entries from the LDIF file if present
* @throws Exception