Browse Source

add app dir creation on assets processing, update i2pd to trunk

Signed-off-by: r4sas <r4sas@i2pmail.org>
master
R4SAS 3 days ago
parent
commit
66809c5ae4
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 12
      app/src/main/java/org/purplei2p/i2pd/DaemonWrapper.java
  2. 2
      binary/jni/i2pd

12
app/src/main/java/org/purplei2p/i2pd/DaemonWrapper.java

@ -203,7 +203,15 @@ public class DaemonWrapper { @@ -203,7 +203,15 @@ public class DaemonWrapper {
}
private void processAssets() {
File holderFile = new File(i2pdpath, "assets.ready");
// Checking if application folder exists, and create it if not
Log.d(TAG, "checking app directory");
File appPath = new File(i2pdpath)
if (!appPath.exists()) {
boolean result = appPath.mkdir();
Log.d(TAG, "appPath.mkdir() returned " + result + " for " + appPath);
}
File holderFile = new File(appPath, "assets.ready");
String versionName = BuildConfig.VERSION_NAME; // here will be app version, like 2.XX.XX
StringBuilder text = new StringBuilder();
Log.d(TAG, "checking assets");
@ -246,7 +254,7 @@ public class DaemonWrapper { @@ -246,7 +254,7 @@ public class DaemonWrapper {
boolean deleteResult = holderFile.delete();
if (!deleteResult)
Log.e(TAG, "holderFile.delete() returned " + deleteResult + ", absolute path='" + holderFile.getAbsolutePath() + "'");
File certPath = new File(i2pdpath, "certificates");
File certPath = new File(appPath, "certificates");
deleteRecursive(certPath);
// copy assets. If processed file exists, it won't be overwritten

2
binary/jni/i2pd

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit 905c6debf2a7f7e651a7916e646a2aee25ba57c7
Subproject commit 7497741846fa41570c728150d1901abcf0ef2ee1
Loading…
Cancel
Save