* ConsoleRunner:

- Fix webapps file path
    * SusiDNS:
      - Fix addressbook file path
    * Systray:
      - Fix NPE if no config file
      - Fix config file path
    * WorkingDir:
      - Modify clients.config so jetty can find the jetty.xml file
      - Rip out all the existing-installation migration code
      - Rip out migration code now done by izpack parsable
      - Fix copy of empty directories
This commit is contained in:
zzz
2009-06-13 23:47:08 +00:00
parent 24daf00616
commit e5ec72b09b
5 changed files with 53 additions and 218 deletions

View File

@ -60,11 +60,10 @@ public class ConfigFile {
_properties.load(fileInputStream);
} catch (Exception e) {
rv = false;
}
try {
fileInputStream.close();
} catch (IOException e) {
// No worries.
} finally {
if (fileInputStream != null) {
try { fileInputStream.close(); } catch (IOException e) {}
}
}
return rv;
}
@ -78,11 +77,10 @@ public class ConfigFile {
_properties.store(fileOutputStream, null);
} catch (Exception e) {
rv = false;
}
try {
fileOutputStream.close();
} catch (IOException e) {
// No worries.
} finally {
if (fileOutputStream != null) {
try { fileOutputStream.close(); } catch (IOException e) {}
}
}
return rv;
}

View File

@ -10,9 +10,12 @@
package net.i2p.apps.systray;
import java.awt.Frame;
import java.io.File;
import net.i2p.I2PAppContext;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer;
import snoozesoft.systray4j.SysTrayMenu;
import snoozesoft.systray4j.SysTrayMenuEvent;
import snoozesoft.systray4j.SysTrayMenuIcon;
@ -36,7 +39,8 @@ public class SysTray implements SysTrayMenuListener {
private static UrlLauncher _urlLauncher = new UrlLauncher();
static {
if (!_configFile.init("systray.config")) {
File config = new File(I2PAppContext.getGlobalContext().getConfigDir(), "systray.config");
if (!_configFile.init(config.getAbsolutePath())) {
_configFile.setProperty("browser", "default");
_configFile.setProperty("port", "7657");
}