From 2518a13dca43c0227a982e429ed83fda8d6110c4 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Wed, 16 Aug 2006 19:45:25 +0000
Subject: [PATCH] Add a getFileForPath method to the StaticUtils class, and update several server components to use it.  This can help ensure that relative paths are evaluated relative to the server root rather than whatever happened to be the current working directory when the start script was launched.

---
 opends/src/server/org/opends/server/backends/task/TaskScheduler.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/task/TaskScheduler.java b/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
index a546a13..d141cc6 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
@@ -932,7 +932,7 @@
 
     try
     {
-      File backingFile = new File(backingFilePath);
+      File backingFile = getFileForPath(backingFilePath);
       if (! backingFile.exists())
       {
         createNewTaskBackingFile();
@@ -1205,7 +1205,7 @@
 
 
       // See if there is a ".save" file.  If so, then delete it.
-      File saveFile = new File(backingFilePath + ".save");
+      File saveFile = getFileForPath(backingFilePath + ".save");
       try
       {
         if (saveFile.exists())
@@ -1220,7 +1220,7 @@
 
 
       // If there is an existing backing file, then rename it to ".save".
-      File backingFile = new File(backingFilePath);
+      File backingFile = getFileForPath(backingFilePath);
       try
       {
         if (backingFile.exists())
@@ -1246,7 +1246,7 @@
 
 
       // Rename the ".tmp" file into place.
-      File tmpFile = new File(tmpFilePath);
+      File tmpFile = getFileForPath(tmpFilePath);
       try
       {
         tmpFile.renameTo(backingFile);

--
Gitblit v1.10.0