diff --git a/build.xml b/build.xml
index 3a36de8b6..bf27fd748 100644
--- a/build.xml
+++ b/build.xml
@@ -1827,7 +1827,6 @@
-
@@ -1846,7 +1845,6 @@
-
diff --git a/core/java/build.xml b/core/java/build.xml
index 895a93f97..217e5ae97 100644
--- a/core/java/build.xml
+++ b/core/java/build.xml
@@ -109,9 +109,12 @@
+
+
+
+
-
-
+
diff --git a/core/java/src/net/i2p/util/resources/dohservers.txt b/core/resources/dohservers.txt
similarity index 100%
rename from core/java/src/net/i2p/util/resources/dohservers.txt
rename to core/resources/dohservers.txt
diff --git a/router/java/build.xml b/router/java/build.xml
index 0e1c3db21..8ff50285e 100644
--- a/router/java/build.xml
+++ b/router/java/build.xml
@@ -70,7 +70,11 @@
-
+
+
+
+
+
diff --git a/router/java/src/net/i2p/router/time/Zones.java b/router/java/src/net/i2p/router/time/Zones.java
index d04c67408..ad13c6e5d 100644
--- a/router/java/src/net/i2p/router/time/Zones.java
+++ b/router/java/src/net/i2p/router/time/Zones.java
@@ -3,7 +3,7 @@ package net.i2p.router.time;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.File;
-import java.io.FileInputStream;
+import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Locale;
@@ -87,20 +87,14 @@ class Zones {
* ref: http://dev.maxmind.com/geoip/legacy/codes/country_continent/
*/
private void readContinentFile() {
- String geoDir = _context.getProperty(GeoIP.PROP_GEOIP_DIR, GeoIP.GEOIP_DIR_DEFAULT);
- File geoFile = new File(geoDir);
- if (!geoFile.isAbsolute())
- geoFile = new File(_context.getBaseDir(), geoDir);
- geoFile = new File(geoFile, CONTINENT_FILE_DEFAULT);
- if (!geoFile.exists()) {
- //if (_log.shouldWarn())
- // _log.warn("Continent file not found: " + geoFile.getAbsolutePath());
+ InputStream is = Zones.class.getResourceAsStream("/net/i2p/router/util/resources/" + CONTINENT_FILE_DEFAULT);
+ if (is == null) {
+ System.out.println("Continent file not found");
return;
}
BufferedReader br = null;
try {
- br = new BufferedReader(new InputStreamReader(
- new FileInputStream(geoFile), "UTF-8"));
+ br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
String line = null;
while ((line = br.readLine()) != null) {
try {
@@ -118,8 +112,9 @@ class Zones {
} catch (IndexOutOfBoundsException ioobe) {}
}
} catch (IOException ioe) {
- System.out.println("Error reading the continent file " + geoFile.getAbsolutePath());
+ System.out.println("Error reading the continent file");
} finally {
+ try { is.close(); } catch (IOException ioe) {}
if (br != null) try { br.close(); } catch (IOException ioe) {}
}
}
diff --git a/installer/resources/continents.txt b/router/resources/continents.txt
similarity index 100%
rename from installer/resources/continents.txt
rename to router/resources/continents.txt