Skip to content

Commit

Permalink
add app dir creation on assets processing, update i2pd to trunk
Browse files Browse the repository at this point in the history
Signed-off-by: r4sas <r4sas@i2pmail.org>
  • Loading branch information
r4sas committed Dec 19, 2024
1 parent 06f337f commit 66809c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions app/src/main/java/org/purplei2p/i2pd/DaemonWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,15 @@ public synchronized void startDaemon() {
}

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");
Expand Down Expand Up @@ -246,7 +254,7 @@ private void processAssets() {
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
Expand Down
2 changes: 1 addition & 1 deletion binary/jni/i2pd
Submodule i2pd updated 100 files

0 comments on commit 66809c5

Please sign in to comment.