Fixes IDEMPIERE-5684 Bad naming of Automatic 2Packs stop the whole process (#1794)
This commit is contained in:
parent
d954b926a2
commit
d201650cf4
|
@ -122,6 +122,11 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack
|
|||
int clientId = Env.getAD_Client_ID(Env.getCtx());
|
||||
if (version == null) {
|
||||
String [] parts = fileName.split("_");
|
||||
if (parts.length < 2) {
|
||||
logger.warning("Wrong name, ignored " + fileName);
|
||||
return false;
|
||||
}
|
||||
logger.warning(fileName);
|
||||
String clientValue = parts[1];
|
||||
clientId = DB.getSQLValueEx(null, "SELECT AD_Client_ID FROM AD_Client WHERE Value=?", clientValue);
|
||||
if (clientId < 0)
|
||||
|
|
|
@ -150,12 +150,14 @@ public class PackInApplicationActivator extends AbstractActivator{
|
|||
private boolean packIn(File packinFile) {
|
||||
if (packinFile != null) {
|
||||
String fileName = packinFile.getName();
|
||||
logger.warning("Installing " + fileName + " ...");
|
||||
|
||||
// The convention for package names is: yyyymmddHHMM_ClientValue_InformationalDescription.zip
|
||||
String [] parts = fileName.split("_");
|
||||
if (parts.length < 2) {
|
||||
logger.warning("Wrong name, ignored " + fileName);
|
||||
return false;
|
||||
}
|
||||
logger.warning("Installing " + fileName + " ...");
|
||||
String clientValue = parts[1];
|
||||
|
||||
boolean allClients = clientValue.startsWith("ALL-CLIENTS");
|
||||
|
||||
int[] clientIDs;
|
||||
|
|
Loading…
Reference in New Issue