diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-22 10:22:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-13 08:42:55 +0200 |
commit | 7e394e7746150699b42b464970d8ad71c462996d (patch) | |
tree | 932041d20b141db13b0b08084aa1a44844a59899 /qadevOOo | |
parent | 000e24d22d2e18c006277ec24148c7252c9f678d (diff) |
java: DONT_BACKUP_USERLAYER parameter is unused
Change-Id: I2e66a6acfd50b929d43ffdb3e468042875b6b23d
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/helper/OfficeProvider.java | 50 | ||||
-rw-r--r-- | qadevOOo/runner/util/PropertyName.java | 4 |
2 files changed, 22 insertions, 32 deletions
diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java index a1d39100ccbf..8b20a3cf99c2 100644 --- a/qadevOOo/runner/helper/OfficeProvider.java +++ b/qadevOOo/runner/helper/OfficeProvider.java @@ -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; } diff --git a/qadevOOo/runner/util/PropertyName.java b/qadevOOo/runner/util/PropertyName.java index 1932a74c6fa7..7a37125eb7ce 100644 --- a/qadevOOo/runner/util/PropertyName.java +++ b/qadevOOo/runner/util/PropertyName.java @@ -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"; } |