Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD:

46292: Fix for ALF-17783: Checks and creates the backup directory when needed.
   46295: Added some more tests related to ALF-17783

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@46765 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2013-02-19 10:18:01 +00:00
parent 1492f83691
commit a6f0a3b423
4 changed files with 21 additions and 3 deletions

View File

@@ -583,6 +583,14 @@ public class ModuleManagementTool implements LogOutput
backupLocation = BACKUP_DIR + "/" + generateGuid() + ".bin";
if (preview == false)
{
//Create the directory if it doesn't exist.
TFile backupLocationDirectory = new TFile(warFileLocation+ BACKUP_DIR);
if (!backupLocationDirectory.exists())
{
backupLocationDirectory.mkdir();
}
//Backup the file
TFile backupFile = new TFile(warFileLocation + backupLocation);
destinationChild.cp_rp(backupFile);
}