catch security exceptions at fillExtraOutput

This commit is contained in:
tibbi 2018-01-09 10:02:03 +01:00
parent c930ed5cda
commit 50003b38fb

View file

@ -476,6 +476,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
inputStream = FileInputStream(File(path))
outputStream = contentResolver.openOutputStream(output)
inputStream.copyTo(outputStream)
} catch (e: SecurityException) {
showErrorToast(e)
} catch (ignored: FileNotFoundException) {
} finally {
inputStream?.close()