Actually fix the parentFile warning
This commit is contained in:
parent
e7ae215ab0
commit
2c1df5f875
1 changed files with 3 additions and 2 deletions
|
@ -207,8 +207,9 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
|
|||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (data != null && data.data != null && resultCode == Activity.RESULT_OK) {
|
||||
if (requestCode == REQUEST_EXPORT_CODE) {
|
||||
val exportFile = Utils.getFileForUri(data.data!!)!!
|
||||
if (!exportFile.parentFile.canWrite() || !exportFile.parentFile.canRead()) {
|
||||
val exportFile = Utils.getFileForUri(data.data!!)
|
||||
val parentFile = exportFile.parentFile!!
|
||||
if (!parentFile.canWrite() || !parentFile.canRead()) {
|
||||
Toast.makeText(activity, R.string.invalid_directory, Toast.LENGTH_SHORT).show()
|
||||
} else {
|
||||
activity.startService(
|
||||
|
|
Loading…
Reference in a new issue