We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66a03b7 commit 8194bfeCopy full SHA for 8194bfe
app/src/main/kotlin/com/androidvip/sysctlgui/ui/params/browse/BrowseParamsViewModel.kt
@@ -104,7 +104,9 @@ class BrowseParamsViewModel(
104
105
private suspend fun getCurrentPathFiles(path: String) = withContext(dispatcher) {
106
runCatching {
107
- SuFile.open(path).listFiles()?.toList()
+ val baseFile = File(path)
108
+ val file = if (baseFile.canRead()) baseFile else SuFile.open(path)
109
+ file.listFiles()?.toList()
110
}.getOrDefault(emptyList())
111
}
112
0 commit comments