Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ea48bef authored by tibbi's avatar tibbi
Browse files

catch extensions at creating fileoutputstreams

parent a6ae985d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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 {
        try {
            FileOutputStream(targetFile)
        } catch (e: Exception) {
            showErrorToast(e)
            null
        }
    }
}