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)
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
if (data != null && data.data != null && resultCode == Activity.RESULT_OK) {
|
if (data != null && data.data != null && resultCode == Activity.RESULT_OK) {
|
||||||
if (requestCode == REQUEST_EXPORT_CODE) {
|
if (requestCode == REQUEST_EXPORT_CODE) {
|
||||||
val exportFile = Utils.getFileForUri(data.data!!)!!
|
val exportFile = Utils.getFileForUri(data.data!!)
|
||||||
if (!exportFile.parentFile.canWrite() || !exportFile.parentFile.canRead()) {
|
val parentFile = exportFile.parentFile!!
|
||||||
|
if (!parentFile.canWrite() || !parentFile.canRead()) {
|
||||||
Toast.makeText(activity, R.string.invalid_directory, Toast.LENGTH_SHORT).show()
|
Toast.makeText(activity, R.string.invalid_directory, Toast.LENGTH_SHORT).show()
|
||||||
} else {
|
} else {
|
||||||
activity.startService(
|
activity.startService(
|
||||||
|
|
Loading…
Reference in a new issue