Skip to content

Commit 1dd7178

Browse files
committed
update commons to 2.27.8
1 parent 44a16bf commit 1dd7178

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ android {
3737
}
3838

3939
dependencies {
40-
compile 'com.simplemobiletools:commons:2.27.7'
40+
compile 'com.simplemobiletools:commons:2.27.8'
4141
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
4242
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
4343

app/src/main/kotlin/com/simplemobiletools/filemanager/helpers/RootHelpers.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.simplemobiletools.filemanager.helpers
22

33
import android.text.TextUtils
4+
import com.simplemobiletools.commons.extensions.areDigitsOnly
45
import com.simplemobiletools.commons.extensions.showErrorToast
56
import com.simplemobiletools.commons.models.FileDirItem
67
import com.simplemobiletools.filemanager.activities.SimpleActivity
@@ -52,7 +53,7 @@ class RootHelpers {
5253
val childrenCnt = if (isFile) "0" else parts[2].trim()
5354
val filename = TextUtils.join(" ", parts.subList(3, parts.size)).trimStart('/')
5455

55-
if ((!showHidden && filename.startsWith(".")) || (!isDirectory && !isFile) || !areDigitsOnly(size) || !areDigitsOnly(childrenCnt)) {
56+
if ((!showHidden && filename.startsWith(".")) || (!isDirectory && !isFile) || !size.areDigitsOnly() || !childrenCnt.areDigitsOnly()) {
5657
super.commandOutput(id, line)
5758
return
5859
}
@@ -82,6 +83,4 @@ class RootHelpers {
8283
activity.showErrorToast(e)
8384
}
8485
}
85-
86-
private fun areDigitsOnly(value: String) = value.matches(Regex("[0-9]+"))
8786
}

0 commit comments

Comments
 (0)