I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a14643f7 authored by zzz's avatar zzz
Browse files

fix eepsite migration in packages

parent 0ad4789f
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,7 @@ abstract class MigrateJetty { ...@@ -41,6 +41,7 @@ abstract class MigrateJetty {
private static final String NEW_CLASS = "org.mortbay.start.Main"; private static final String NEW_CLASS = "org.mortbay.start.Main";
private static final String BACKUP = "jetty5.xml"; private static final String BACKUP = "jetty5.xml";
private static final String JETTY6_TEMPLATE_DIR = "eepsite-jetty6"; private static final String JETTY6_TEMPLATE_DIR = "eepsite-jetty6";
private static final String JETTY6_TEMPLATE_PKGDIR = "eepsite";
private static final String BASE_CONTEXT = "contexts/base-context.xml"; private static final String BASE_CONTEXT = "contexts/base-context.xml";
private static final String CGI_CONTEXT = "contexts/cgi-context.xml"; private static final String CGI_CONTEXT = "contexts/cgi-context.xml";
...@@ -83,6 +84,15 @@ abstract class MigrateJetty { ...@@ -83,6 +84,15 @@ abstract class MigrateJetty {
continue; continue;
} }
File baseEep = new File(ctx.getBaseDir(), JETTY6_TEMPLATE_DIR); File baseEep = new File(ctx.getBaseDir(), JETTY6_TEMPLATE_DIR);
// in packages, or perhaps on an uninstall/reinstall, the files are in eepsite/
if (!baseEep.exists())
baseEep = new File(ctx.getBaseDir(), JETTY6_TEMPLATE_PKGDIR);
if (baseEep.equals(eepsite)) {
// non-split directory yet not an upgrade? shouldn't happen
System.err.println("Eepsite in non-split directory " + eepsite +
", cannot migrate " + client);
continue;
}
// jetty.xml existed before in jetty 5 version, so check this new file // jetty.xml existed before in jetty 5 version, so check this new file
// and if it doesn't exist we can't continue // and if it doesn't exist we can't continue
File baseContext = new File(baseEep, BASE_CONTEXT); File baseContext = new File(baseEep, BASE_CONTEXT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment