From 0df071f4aab05eb5aee458d2aafb48c0dc65b309 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 21 Jan 2008 12:10:39 +0000
Subject: [PATCH] Fix issues 2831 and 1948.
---
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
index 42a0de5..09507b7 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
@@ -143,7 +143,8 @@
throws DatabaseException, ConfigException
{
// Determine the backend database directory.
- File backendDirectory = getFileForPath(config.getDBDirectory());
+ File parentDirectory = getFileForPath(config.getDBDirectory());
+ File backendDirectory = new File(parentDirectory, config.getBackendId());
// Create the directory if it doesn't exist.
if (!backendDirectory.exists())
@@ -724,8 +725,10 @@
{
boolean acceptable = true;
- File backendDirectory = getFileForPath(cfg.getDBDirectory());
- //Make sure the directory either alreadly exists or is able to create.
+ File parentDirectory = getFileForPath(config.getDBDirectory());
+ File backendDirectory = new File(parentDirectory, config.getBackendId());
+
+ //Make sure the directory either already exists or is able to create.
if (!backendDirectory.exists())
{
if(!backendDirectory.mkdirs())
@@ -806,7 +809,7 @@
EnvironmentConfig oldEnvConfig = env.getConfig();
EnvironmentConfig newEnvConfig =
ConfigurableEnvironment.parseConfigEntry(cfg);
- Map paramsMap = EnvironmentParams.SUPPORTED_PARAMS;
+ Map<?,?> paramsMap = EnvironmentParams.SUPPORTED_PARAMS;
// Iterate through native JE properties.
SortedSet<String> jeProperties = cfg.getJEProperty();
@@ -875,7 +878,9 @@
// Create the directory if it doesn't exist.
if(!cfg.getDBDirectory().equals(this.config.getDBDirectory()))
{
- File backendDirectory = getFileForPath(cfg.getDBDirectory());
+ File parentDirectory = getFileForPath(config.getDBDirectory());
+ File backendDirectory =
+ new File(parentDirectory, config.getBackendId());
if (!backendDirectory.exists())
{
@@ -946,7 +951,9 @@
// Get the backend database backendDirectory permissions and apply
if(FilePermission.canSetPermissions())
{
- File backendDirectory = getFileForPath(cfg.getDBDirectory());
+ File parentDirectory = getFileForPath(config.getDBDirectory());
+ File backendDirectory = new File(parentDirectory,
+ config.getBackendId());
try
{
if(!FilePermission.setPermissions(backendDirectory,
--
Gitblit v1.10.0