From c87e4ae4851db2f760a7b015824793a70bd3c668 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 15 Sep 2006 01:06:48 +0000
Subject: [PATCH] Update the backup task to ensure that relative paths are interpreted relative to the server root rather than relative to the current working directory.
---
opends/src/server/org/opends/server/tasks/BackupTask.java | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/tasks/BackupTask.java b/opends/src/server/org/opends/server/tasks/BackupTask.java
index 8eadb57..8b0ebad 100644
--- a/opends/src/server/org/opends/server/tasks/BackupTask.java
+++ b/opends/src/server/org/opends/server/tasks/BackupTask.java
@@ -244,6 +244,13 @@
// Make sure that the backup directory exists. If not, then create it.
File backupDirFile = new File(backupDirectory);
+ if (! backupDirFile.isAbsolute())
+ {
+ backupDirectory = DirectoryServer.getServerRoot() + File.separator +
+ backupDirectory;
+ backupDirFile = new File(backupDirectory);
+ }
+
if (! backupDirFile.exists())
{
try
--
Gitblit v1.10.0