catch extensions at creating fileoutputstreams
This commit is contained in:
parent
a6ae985dcf
commit
0ea48bef20
1 changed files with 6 additions and 1 deletions
|
@ -621,7 +621,12 @@ fun BaseSimpleActivity.getFileOutputStreamSync(path: String, mimeType: String, p
|
|||
val newDocument = documentFile.createFile(mimeType, path.getFilenameFromPath())
|
||||
applicationContext.contentResolver.openOutputStream(newDocument!!.uri)
|
||||
} else {
|
||||
FileOutputStream(targetFile)
|
||||
try {
|
||||
FileOutputStream(targetFile)
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue