1
0
mirror of https://github.com/PurpleI2P/i2pd-android.git synced 2025-01-09 22:38:10 +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:
R4SAS 2024-12-19 18:57:50 +00:00
parent 06f337f717
commit 66809c5ae4
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
2 changed files with 11 additions and 3 deletions

View File

@ -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 {
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

@ -1 +1 @@
Subproject commit 905c6debf2a7f7e651a7916e646a2aee25ba57c7
Subproject commit 7497741846fa41570c728150d1901abcf0ef2ee1