fix regression from PR #221

when bootstrapping into an empty directory with -Dappbase parameter, the version must be read first from the configuration in order to create a valid appbase after re-reading the just downloaded getdown.txt (in verisoned mode)
This commit is contained in:
e507802
2019-05-29 15:49:37 +02:00
parent ad32699ca3
commit bf0f0deecb
@@ -594,7 +594,10 @@ public class Application
* like the appbase and version. * like the appbase and version.
*/ */
public void initBase (Config config) throws IOException { public void initBase (Config config) throws IOException {
// first determine our application base, this way if anything goes wrong later in the // first extract our version information
_version = config.getLong("version", -1L);
// determine our application base, this way if anything goes wrong later in the
// process, our caller can use the appbase to download a new configuration file // process, our caller can use the appbase to download a new configuration file
_appbase = config.getString("appbase"); _appbase = config.getString("appbase");
if (_appbase == null) { if (_appbase == null) {
@@ -609,9 +612,6 @@ public class Application
_appbase += "/"; _appbase += "/";
} }
// extract our version information
_version = config.getLong("version", -1L);
// if we are a versioned deployment, create a versioned appbase // if we are a versioned deployment, create a versioned appbase
try { try {
_vappbase = createVAppBase(_version); _vappbase = createVAppBase(_version);