IDEMPIERE-4105:add "comment" to 2pack file

refine pack from Carlos
This commit is contained in:
hieplq 2019-11-14 19:40:38 +07:00
parent 43212e22e2
commit 03fe304d7e
3 changed files with 7 additions and 0 deletions

View File

@ -71,6 +71,9 @@ public class PipoDictionaryService implements IDictionaryService {
if (versionSeparatorPos > 0) {
int dotPos = fileName.lastIndexOf(".");
if (dotPos > 0 && dotPos > versionSeparatorPos) {
if (fileName.indexOf("_") != fileName.lastIndexOf("_"))
dotPos=fileName.lastIndexOf("_");
String version = fileName.substring(versionSeparatorPos+"2Pack_".length(), dotPos);
if (version.split("[.]").length == 3) {
packageVersion = version;

View File

@ -201,6 +201,8 @@ public class Incremental2PackActivator extends AbstractActivator {
String p = u.getPath();
int upos=p.lastIndexOf("2Pack_");
int dpos=p.lastIndexOf(".");
if (p.indexOf("_") != p.lastIndexOf("_"))
dpos=p.lastIndexOf("_");
String v = p.substring(upos+"2Pack_".length(), dpos);
return v;
}

View File

@ -170,6 +170,8 @@ public class Version2PackActivator extends AbstractActivator{
String p = u.getPath();
int upos=p.lastIndexOf("_");
int dpos=p.lastIndexOf(".");
if (p.indexOf("_") != p.lastIndexOf("_"))
dpos=p.lastIndexOf("_");
String v = p.substring(upos+1, dpos);
return v;
}