Browse Source

android - dont rewrite files from assets if they exist

pull/1226/head
R4SAS 6 years ago
parent
commit
d009a29426
  1. 6
      android/src/org/purplei2p/i2pd/I2PDActivity.java

6
android/src/org/purplei2p/i2pd/I2PDActivity.java

@ -36,7 +36,6 @@ public class I2PDActivity extends Activity { @@ -36,7 +36,6 @@ public class I2PDActivity extends Activity {
private final DaemonSingleton.StateUpdateListener daemonStateUpdatedListener =
new DaemonSingleton.StateUpdateListener() {
@Override
public void daemonStateUpdate()
{
@ -48,7 +47,7 @@ public class I2PDActivity extends Activity { @@ -48,7 +47,7 @@ public class I2PDActivity extends Activity {
assetsCopied = true;
copyAsset("certificates");
copyAsset("i2pd.conf");
copyAsset("subsciptions.txt");
copyAsset("subscriptions.txt");
copyAsset("tunnels.conf");
}
}
@ -172,7 +171,6 @@ public class I2PDActivity extends Activity { @@ -172,7 +171,6 @@ public class I2PDActivity extends Activity {
}
};
private static volatile boolean mIsBound;
private void doBindService() {
@ -354,7 +352,7 @@ public class I2PDActivity extends Activity { @@ -354,7 +352,7 @@ public class I2PDActivity extends Activity {
*/
private void copyFileAsset(String path) {
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/i2pd/", path);
try {
if(!file.exists()) try {
InputStream in = getAssets().open(path);
OutputStream out = new FileOutputStream(file);
byte[] buffer = new byte[1024];

Loading…
Cancel
Save