mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
catch FileNotFoundException at returning GetImageContent intent result
This commit is contained in:
parent
5d2528b415
commit
9452d96e75
1 changed files with 2 additions and 4 deletions
|
@ -27,10 +27,7 @@ import com.simplemobiletools.gallery.helpers.*
|
|||
import com.simplemobiletools.gallery.models.Directory
|
||||
import com.simplemobiletools.gallery.views.MyScalableRecyclerView
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.InputStream
|
||||
import java.io.OutputStream
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
|
||||
class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||
|
@ -302,6 +299,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
inputStream = FileInputStream(File(path))
|
||||
outputStream = contentResolver.openOutputStream(output)
|
||||
inputStream.copyTo(outputStream)
|
||||
} catch (ignored: FileNotFoundException) {
|
||||
} finally {
|
||||
inputStream?.close()
|
||||
outputStream?.close()
|
||||
|
|
Loading…
Reference in a new issue