mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +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.models.Directory
|
||||||
import com.simplemobiletools.gallery.views.MyScalableRecyclerView
|
import com.simplemobiletools.gallery.views.MyScalableRecyclerView
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import java.io.File
|
import java.io.*
|
||||||
import java.io.FileInputStream
|
|
||||||
import java.io.InputStream
|
|
||||||
import java.io.OutputStream
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
|
@ -302,6 +299,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
inputStream = FileInputStream(File(path))
|
inputStream = FileInputStream(File(path))
|
||||||
outputStream = contentResolver.openOutputStream(output)
|
outputStream = contentResolver.openOutputStream(output)
|
||||||
inputStream.copyTo(outputStream)
|
inputStream.copyTo(outputStream)
|
||||||
|
} catch (ignored: FileNotFoundException) {
|
||||||
} finally {
|
} finally {
|
||||||
inputStream?.close()
|
inputStream?.close()
|
||||||
outputStream?.close()
|
outputStream?.close()
|
||||||
|
|
Loading…
Reference in a new issue