mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-13 01:20:22 +03:00
android - dont rewrite files from assets if they exist
This commit is contained in:
parent
f1fb42460a
commit
d009a29426
@ -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 {
|
||||
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 {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private static volatile boolean mIsBound;
|
||||
|
||||
private void doBindService() {
|
||||
@ -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…
Reference in New Issue
Block a user