Skip to content

Commit

Permalink
1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lumkit committed Jun 26, 2024
1 parent d2750bb commit aa50d22
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repositories {

```kotlin
dependencies {
implementation("io.github.lumkit:lint-file:1.0.2")
implementation("io.github.lumkit:lint-file:1.0.3")
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ import androidx.documentfile.provider.DocumentFile
import io.github.lumkit.io.LintFile
import io.github.lumkit.io.LintFileConfiguration
import io.github.lumkit.io.absolutePath
import io.github.lumkit.io.androidPath
import io.github.lumkit.io.documentFileUri
import io.github.lumkit.io.documentReallyUri
import io.github.lumkit.io.primaryChildPath
import io.github.lumkit.io.uri
import java.io.File
import java.io.FileNotFoundException
import java.io.IOException

class StorageAccessFrameworkFile : LintFile {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.lumkit.io.impl

import io.github.lumkit.io.LintFile
import io.github.lumkit.io.pathHandle
import java.io.File

class SuFile: LintFile {
Expand Down Expand Up @@ -29,7 +30,7 @@ class SuFile: LintFile {
constructor(file: LintFile, child: String): super(file, child)

internal val suFile by lazy {
com.topjohnwu.superuser.io.SuFile(path)
com.topjohnwu.superuser.io.SuFile(path.pathHandle(false))
}

override fun exists(): Boolean = suFile.exists()
Expand Down
2 changes: 1 addition & 1 deletion file-android/src/main/java/io/github/lumkit/io/io.kt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fun String.pathHandle(hide: Boolean = true): String =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE && hide) {
this.replace("Android", "Android\u200d")
} else {
this
this.replace("\u200d", "")
}

@Throws(IOException::class)
Expand Down
2 changes: 1 addition & 1 deletion file-android/src/main/java/io/github/lumkit/io/saf.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fun String.getPrivateRootPath(): String {
val builder = StringBuilder()
for (i in 0 until if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) 6 else 5) {
builder.append("/")
.append(list[i])
.append(list[i].replace("\u200d", ""))
}
return builder.toString()
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ composeBom = "2023.08.00"
vanniktech = "0.28.0"
appcompat = "1.6.1"
material = "1.10.0"
lint-file = "1.0.2"
lint-file = "1.0.3"
kotlinx-serialization = "1.6.3"
lifecycle-runtime = "2.7.0"
runtimeLivedata = "1.5.4"
Expand Down

0 comments on commit aa50d22

Please sign in to comment.