mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
add a null check at ReadTextActivity
This commit is contained in:
@ -65,6 +65,11 @@ class ReadTextActivity : SimpleActivity() {
|
||||
private fun checkIntent() {
|
||||
read_text_view.setTextColor(config.textColor)
|
||||
val uri = intent.data
|
||||
if (uri == null) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
val text = if (uri.scheme == "file") {
|
||||
filePath = uri.path
|
||||
File(uri.path).readText()
|
||||
|
Reference in New Issue
Block a user