From d2327052dc1d968e7ab5c542dac01e6bb8791dcb Mon Sep 17 00:00:00 2001 From: Hardcore Sushi Date: Sun, 26 Jun 2022 13:15:51 +0200 Subject: [PATCH] Finalize libcryfs --- .gitmodules | 3 +-- BUILD.md | 2 ++ app/libcryfs | 2 +- app/libgocryptfs | 2 +- app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt | 2 +- gradle.properties | 4 +++- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8077d5a..7d464bd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,5 +6,4 @@ url = https://forge.chapril.org/hardcoresushi/libpdfviewer.git [submodule "app/libcryfs"] path = app/libcryfs - url = https://github.com/hardcore-sushi/libcryfs.git - branch = genesis + url = https://forge.chapril.org/hardcoresushi/libcryfs.git diff --git a/BUILD.md b/BUILD.md index 4890387..7a61ecc 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,6 +1,8 @@ # Introduction DroidFS relies on modified versions of the original encrypted filesystems programs to open volumes. [CryFS](https://github.com/cryfs/cryfs) is written in C++ while [gocryptfs](https://github.com/rfjakob/gocryptfs) is written in Go. Thus, building DroidFS requires the compilation of native code. However, for the sake of simplicity, the application has been designed in a modular way: you can build a version of DroidFS that supports both Gocryptfs and CryFS, or only one of the two. +Moreover, DroidFS aims to be accessible to as many people as possible. If you encounter any problems or need help with the build, feel free to open an issue, a discussion, or contact me by [email](mailto:hardcore.sushi@disroot.org) or on [Matrix](https://matrix.org): @hardcoresushi:matrix.underworld.fr + # Setup Install required packages: ``` diff --git a/app/libcryfs b/app/libcryfs index 267fb40..335815d 160000 --- a/app/libcryfs +++ b/app/libcryfs @@ -1 +1 @@ -Subproject commit 267fb40fe77e5ef079759bebd395c7a92ef072d2 +Subproject commit 335815d25ac90f3d4964f88b542746ab5b270397 diff --git a/app/libgocryptfs b/app/libgocryptfs index 9e98192..7afeb9f 160000 --- a/app/libgocryptfs +++ b/app/libgocryptfs @@ -1 +1 @@ -Subproject commit 9e98192442b08362660b45f4e2e50221ba7bc65b +Subproject commit 7afeb9f3a4e0316365e843d3f4afd50201fbb253 diff --git a/app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt b/app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt index c272167..b3d82a0 100644 --- a/app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt +++ b/app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt @@ -46,7 +46,7 @@ object PathUtils { } fun getRelativePath(parentPath: String, childPath: String): String { - return childPath.substring(parentPath.length + if (parentPath.endsWith(SEPARATOR)) { + return childPath.substring(parentPath.length + if (parentPath.endsWith(SEPARATOR) || childPath.length == parentPath.length) { 0 } else { 1 diff --git a/gradle.properties b/gradle.properties index 4d15d01..4b2efe1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,6 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official + +android.native.buildOutput=verbose \ No newline at end of file