Fix save img

This commit is contained in:
小白-白 authored and tarsin committed 2023-03-24 08:21:08 +08:00
1 parent 1a0474420b
commit 97733ca337
1 file changed
+11 -10
@@ -210,18 +210,19 @@ class SpiderDen(private val mGalleryInfo: GalleryInfo) {
it.printStackTrace()
return false
}
}
downloadDir?.let { uniFile ->
runCatching {
findImageFile(uniFile, index)?.openFileDescriptor("r")?.use {
it sendTo toFd
}
}.onFailure {
it.printStackTrace()
return false
}.onSuccess {
return true
// Read from download dir
downloadDir?.let { uniFile ->
runCatching {
findImageFile(uniFile, index)?.openFileDescriptor("r")?.use {
it sendTo toFd
}
}.onFailure {
it.printStackTrace()
return false
}.onSuccess {
return true
}
}
}