mirror of
https://github.com/PurpleI2P/i2pd-android.git
synced 2025-01-08 22:07:57 +00:00
add app dir creation on assets processing, update i2pd to trunk
Signed-off-by: r4sas <r4sas@i2pmail.org>
This commit is contained in:
parent
06f337f717
commit
66809c5ae4
@ -203,7 +203,15 @@ public class DaemonWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void processAssets() {
|
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
|
String versionName = BuildConfig.VERSION_NAME; // here will be app version, like 2.XX.XX
|
||||||
StringBuilder text = new StringBuilder();
|
StringBuilder text = new StringBuilder();
|
||||||
Log.d(TAG, "checking assets");
|
Log.d(TAG, "checking assets");
|
||||||
@ -246,7 +254,7 @@ public class DaemonWrapper {
|
|||||||
boolean deleteResult = holderFile.delete();
|
boolean deleteResult = holderFile.delete();
|
||||||
if (!deleteResult)
|
if (!deleteResult)
|
||||||
Log.e(TAG, "holderFile.delete() returned " + deleteResult + ", absolute path='" + holderFile.getAbsolutePath() + "'");
|
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);
|
deleteRecursive(certPath);
|
||||||
|
|
||||||
// copy assets. If processed file exists, it won't be overwritten
|
// copy assets. If processed file exists, it won't be overwritten
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 905c6debf2a7f7e651a7916e646a2aee25ba57c7
|
Subproject commit 7497741846fa41570c728150d1901abcf0ef2ee1
|
Loading…
Reference in New Issue
Block a user