catch security exceptions at fillExtraOutput
This commit is contained in:
parent
c930ed5cda
commit
50003b38fb
1 changed files with 2 additions and 0 deletions
|
@ -476,6 +476,8 @@ 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 (e: SecurityException) {
|
||||||
|
showErrorToast(e)
|
||||||
} catch (ignored: FileNotFoundException) {
|
} catch (ignored: FileNotFoundException) {
|
||||||
} finally {
|
} finally {
|
||||||
inputStream?.close()
|
inputStream?.close()
|
||||||
|
|
Loading…
Reference in a new issue