add a file to invalids only if it doesnt exist
This commit is contained in:
parent
1d0ed2a3eb
commit
a34685176f
2 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
||||||
val file = File(fullPath)
|
val file = File(fullPath)
|
||||||
val size = cursor.getLongValue(MediaStore.Images.Media.SIZE)
|
val size = cursor.getLongValue(MediaStore.Images.Media.SIZE)
|
||||||
|
|
||||||
if (size == 0L) {
|
if (size == 0L && !file.exists()) {
|
||||||
invalidFiles.add(file)
|
invalidFiles.add(file)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo
|
||||||
val file = File(curPath)
|
val file = File(curPath)
|
||||||
val size = cursor.getLongValue(MediaStore.Images.Media.SIZE)
|
val size = cursor.getLongValue(MediaStore.Images.Media.SIZE)
|
||||||
|
|
||||||
if (size == 0L) {
|
if (size == 0L && !file.exists()) {
|
||||||
invalidFiles.add(file)
|
invalidFiles.add(file)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue