Compare commits

..

No commits in common. "f4e47c1827e92b60c938de62ed2f49875d152567" and "719faa31ee3feddf915dde36738d994ee723a146" have entirely different histories.

5 changed files with 12 additions and 21 deletions

View File

@ -21,7 +21,7 @@ if (hasProperty("nosplits")) {
android {
compileSdk 34
ndkVersion "26.1.10909125"
ndkVersion "25.2.9519653"
namespace "sushi.hardcore.droidfs"
compileOptions {
@ -58,7 +58,6 @@ android {
splits {
abi {
enable true
reset() // fix unknown bug (https://ru.stackoverflow.com/questions/1557805/abis-armeabi-mips-mips64-riscv64-are-not-supported-for-platform)
universalApk true
}
}

View File

@ -6,7 +6,7 @@ object FileTypes {
private val FILE_EXTENSIONS = mapOf(
Pair("image", listOf("png", "jpg", "jpeg", "gif", "webp", "bmp", "heic")),
Pair("video", listOf("mp4", "webm", "mkv", "mov")),
Pair("audio", listOf("mp3", "ogg", "m4a", "wav", "flac", "opus")),
Pair("audio", listOf("mp3", "ogg", "m4a", "wav", "flac")),
Pair("pdf", listOf("pdf")),
Pair("text", listOf(
"asc",

View File

@ -236,21 +236,14 @@ class VolumeProvider: DocumentsProvider() {
): String? {
if (!usfExpose || !usfSafWrite) return null
val document = parseDocumentId(parentDocumentId) ?: return null
val path = PathUtils.pathJoin(document.path, displayName)
var success = false
if (mimeType == DocumentsContract.Document.MIME_TYPE_DIR) {
success = document.encryptedVolume.mkdir(path)
} else {
val f = document.encryptedVolume.openFileWriteMode(path)
if (f != -1L) {
document.encryptedVolume.closeFile(f)
success = true
}
}
return if (success) {
document.rootId+path
} else {
val newFile = PathUtils.pathJoin(document.path, displayName)
val f = document.encryptedVolume.openFileWriteMode(newFile)
return if (f == -1L) {
Log.e(TAG, "Failed to create file: $document")
null
} else {
document.encryptedVolume.closeFile(f)
document.rootId+newFile
}
}

View File

@ -1,11 +1,11 @@
buildscript {
ext.kotlin_version = '1.9.22'
ext.kotlin_version = '1.9.0'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

View File

@ -15,5 +15,4 @@ android.useAndroidX=true
kotlin.code.style=official
android.native.buildOutput=verbose
android.nonTransitiveRClass=false
org.gradle.configuration-cache=true
android.nonTransitiveRClass=false