Changeset a14643f


Ignore:
Timestamp:
Jan 4, 2012 3:20:35 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
43ec87e
Parents:
0ad4789
Message:

fix eepsite migration in packages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/startup/MigrateJetty.java

    r0ad4789 ra14643f  
    4242    private static final String BACKUP = "jetty5.xml";
    4343    private static final String JETTY6_TEMPLATE_DIR = "eepsite-jetty6";
     44    private static final String JETTY6_TEMPLATE_PKGDIR = "eepsite";
    4445    private static final String BASE_CONTEXT = "contexts/base-context.xml";
    4546    private static final String CGI_CONTEXT = "contexts/cgi-context.xml";
     
    8485            }
    8586            File baseEep = new File(ctx.getBaseDir(), JETTY6_TEMPLATE_DIR);
     87            // in packages, or perhaps on an uninstall/reinstall, the files are in eepsite/
     88            if (!baseEep.exists())
     89                baseEep = new File(ctx.getBaseDir(), JETTY6_TEMPLATE_PKGDIR);
     90            if (baseEep.equals(eepsite)) {
     91                // non-split directory yet not an upgrade? shouldn't happen
     92                System.err.println("Eepsite in non-split directory " + eepsite +
     93                               ", cannot migrate " + client);
     94                continue;
     95            }
    8696            // jetty.xml existed before in jetty 5 version, so check this new file
    8797            // and if it doesn't exist we can't continue
Note: See TracChangeset for help on using the changeset viewer.