2
0
Fork 1
mirror of https://github.com/FossifyOrg/Gallery.git synced 2025-04-07 20:19:40 +02:00

Improve the performance by removing file validity check

This commit is contained in:
tibbi 2016-12-27 20:06:38 +01:00
parent 70c9e4b492
commit 6ba436db80
2 changed files with 2 additions and 2 deletions
app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks

View file

@ -54,7 +54,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
val file = File(fullPath)
val size = cursor.getLongValue(MediaStore.Images.Media.SIZE)
if (size == 0L || !file.exists()) {
if (size == 0L) {
invalidFiles.add(file)
continue
}

View file

@ -55,7 +55,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo
val file = File(curPath)
val size = cursor.getLongValue(MediaStore.Images.Media.SIZE)
if (size == 0L || !file.exists()) {
if (size == 0L) {
invalidFiles.add(file)
continue
}