check if the opened file is a proper type

This commit is contained in:
tibbi 2017-04-09 09:52:43 +02:00
parent db79756667
commit dab7102e61
1 changed files with 6 additions and 0 deletions

View File

@ -108,7 +108,13 @@ class MainActivity : SimpleActivity(), MyCanvas.PathsChangedListener {
private fun openFile() {
FilePickerDialog(this, curPath) {
if (it.endsWith(".svg")) {
} else if (File(it).isImageSlow()) {
} else {
toast(R.string.invalid_file_format)
}
}
}