Browse Source

gh-1918 - Fix dali backupComputer issue

If the intermediate paths of the mirror path on the comupter specified by
backupComputer didn't exist. Dali would fail to create the dali backup
direcotry and cause dali to fail to start

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Jake Smith 13 years ago
parent
commit
7170b4f2e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dali/server/daserver.cpp

+ 1 - 1
dali/server/daserver.cpp

@@ -213,7 +213,6 @@ int main(int argc, char* argv[])
 
 
                     try
                     try
                     {
                     {
-                        recursiveCreateDirectory(mirrorPath);
                         StringBuffer backupURL;
                         StringBuffer backupURL;
                         if (mirrorPath.length()<=2 || !isPathSepChar(mirrorPath.charAt(0)) || !isPathSepChar(mirrorPath.charAt(1)))
                         if (mirrorPath.length()<=2 || !isPathSepChar(mirrorPath.charAt(0)) || !isPathSepChar(mirrorPath.charAt(1)))
                         { // local machine path, convert to url
                         { // local machine path, convert to url
@@ -231,6 +230,7 @@ int main(int argc, char* argv[])
                         }
                         }
                         else
                         else
                             backupURL.append(mirrorPath);
                             backupURL.append(mirrorPath);
+                        recursiveCreateDirectory(backupURL.str());
                         addPathSepChar(backupURL);
                         addPathSepChar(backupURL);
                         serverConfig->setProp("SDS/@remoteBackupLocation", backupURL.str());
                         serverConfig->setProp("SDS/@remoteBackupLocation", backupURL.str());
                         PROGLOG("Backup URL = %s", backupURL.str());
                         PROGLOG("Backup URL = %s", backupURL.str());