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

Skip to content
Snippets Groups Projects
Commit 63a0e211 authored by str4d's avatar str4d
Browse files

Copy i2ptunnel.config from resource for new installs

parent 21e0b2a6
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,7 @@ class InitActivities { ...@@ -82,6 +82,7 @@ class InitActivities {
// settings, which can now be configured manually. We don't want to // settings, which can now be configured manually. We don't want to
// overwrite the user's tunnels. // overwrite the user's tunnels.
//mergeResourceToFile(R.raw.i2ptunnel_config, "i2ptunnel.config", null); //mergeResourceToFile(R.raw.i2ptunnel_config, "i2ptunnel.config", null);
copyResourceToFileIfAbsent(R.raw.i2ptunnel_config, "i2ptunnel.config");
// FIXME this is a memory hog to merge this way // FIXME this is a memory hog to merge this way
mergeResourceToFile(R.raw.hosts_txt, "hosts.txt", null); mergeResourceToFile(R.raw.hosts_txt, "hosts.txt", null);
mergeResourceToFile(R.raw.more_hosts_txt, "hosts.txt", null); mergeResourceToFile(R.raw.more_hosts_txt, "hosts.txt", null);
...@@ -145,6 +146,15 @@ class InitActivities { ...@@ -145,6 +146,15 @@ class InitActivities {
System.setProperty("wrapper.logfile", myDir + "/wrapper.log"); System.setProperty("wrapper.logfile", myDir + "/wrapper.log");
} }
/**
* @param f relative to base dir
*/
private void copyResourceToFileIfAbsent(int resID, String f) {
File file = new File(myDir, f);
if (!file.exists())
copyResourceToFile(resID, f);
}
/** /**
* @param f relative to base dir * @param f relative to base dir
*/ */
......
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