Kaydet (Commit) 7e394e77 authored tarafından Noel Grandin's avatar Noel Grandin

java: DONT_BACKUP_USERLAYER parameter is unused

Change-Id: I2e66a6acfd50b929d43ffdb3e468042875b6b23d
üst 000e24d2
......@@ -281,10 +281,7 @@ public class OfficeProvider implements AppProvider
}
else if (isExecutable)
{
if (!param.getBool(util.PropertyName.DONT_BACKUP_USERLAYER))
{
backupUserLayer(param, msf);
}
backupUserLayer(param, msf);
}
}
else
......@@ -515,39 +512,36 @@ public class OfficeProvider implements AppProvider
param.remove("AppProvider");
param.remove("ServiceFactory");
if (!param.getBool(util.PropertyName.DONT_BACKUP_USERLAYER))
//copy user_backup into user layer
try
{
//copy user_backup into user layer
try
final String userLayer = (String) param.get("userLayer");
final String copyLayer = (String) param.get("copyLayer");
if (userLayer != null && copyLayer != null)
{
final String userLayer = (String) param.get("userLayer");
final String copyLayer = (String) param.get("copyLayer");
if (userLayer != null && copyLayer != null)
{
deleteFilesAndDirector(new File(userLayer));
final File copyFile = new File(copyLayer);
dbg("copy '" + copyFile + "' -> '" + userLayer + "'");
FileTools.copyDirectory(copyFile, new File(userLayer), new String[]
{
"temp"
});
dbg("copy '" + copyFile + "' -> '" + userLayer + "' finished");
deleteFilesAndDirector(new File(userLayer));
final File copyFile = new File(copyLayer);
dbg("copy '" + copyFile + "' -> '" + userLayer + "'");
FileTools.copyDirectory(copyFile, new File(userLayer), new String[]
{
"temp"
});
dbg("copy '" + copyFile + "' -> '" + userLayer + "' finished");
// remove all user_backup folder in temp dir
// this is for the case the runner was killed and some old backup folder still stay in temp dir
// remove all user_backup folder in temp dir
// this is for the case the runner was killed and some old backup folder still stay in temp dir
}
else
{
System.out.println("Cannot copy layer: '" + copyLayer + "' back to user layer: '" + userLayer + "'");
}
}
catch (java.io.IOException e)
else
{
dbg("Couldn't recover from backup\n" + e.getMessage());
System.out.println("Cannot copy layer: '" + copyLayer + "' back to user layer: '" + userLayer + "'");
}
}
catch (java.io.IOException e)
{
dbg("Couldn't recover from backup\n" + e.getMessage());
}
return result;
}
......
......@@ -170,8 +170,4 @@ public interface PropertyName {
*/
String UNXMACXI = "unxmacxi";
/**
* can be used to dont backup the user layer, faster office start/stop but less secure default is to backup the user layer
*/
String DONT_BACKUP_USERLAYER = "DontBackupUserLayer";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment