Loading build.gradle +1 −1 Original line number Original line Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionCode = 1 propVersionName = '4.5.6' propVersionName = '4.5.10' kotlin_version = '1.2.51' kotlin_version = '1.2.51' support_libs = '27.1.1' support_libs = '27.1.1' } } Loading commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt +10 −1 Original line number Original line Diff line number Diff line Loading @@ -671,7 +671,16 @@ fun BaseSimpleActivity.getFileOutputStreamSync(path: String, mimeType: String, p val targetFile = File(path) val targetFile = File(path) return if (needsStupidWritePermissions(path)) { return if (needsStupidWritePermissions(path)) { val documentFile = parentDocumentFile ?: getDocumentFile(path.getParentPath()) var documentFile = parentDocumentFile if (documentFile == null) { if (targetFile.parentFile.exists()) { documentFile = getDocumentFile(targetFile.parentFile.absolutePath) } else { documentFile = getDocumentFile(targetFile.parentFile.parent) documentFile = documentFile!!.createDirectory(targetFile.parentFile.name) } } if (documentFile == null) { if (documentFile == null) { val error = String.format(getString(R.string.could_not_create_file), targetFile.parent) val error = String.format(getString(R.string.could_not_create_file), targetFile.parent) showErrorToast(error) showErrorToast(error) Loading Loading
build.gradle +1 −1 Original line number Original line Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionCode = 1 propVersionName = '4.5.6' propVersionName = '4.5.10' kotlin_version = '1.2.51' kotlin_version = '1.2.51' support_libs = '27.1.1' support_libs = '27.1.1' } } Loading
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt +10 −1 Original line number Original line Diff line number Diff line Loading @@ -671,7 +671,16 @@ fun BaseSimpleActivity.getFileOutputStreamSync(path: String, mimeType: String, p val targetFile = File(path) val targetFile = File(path) return if (needsStupidWritePermissions(path)) { return if (needsStupidWritePermissions(path)) { val documentFile = parentDocumentFile ?: getDocumentFile(path.getParentPath()) var documentFile = parentDocumentFile if (documentFile == null) { if (targetFile.parentFile.exists()) { documentFile = getDocumentFile(targetFile.parentFile.absolutePath) } else { documentFile = getDocumentFile(targetFile.parentFile.parent) documentFile = documentFile!!.createDirectory(targetFile.parentFile.name) } } if (documentFile == null) { if (documentFile == null) { val error = String.format(getString(R.string.could_not_create_file), targetFile.parent) val error = String.format(getString(R.string.could_not_create_file), targetFile.parent) showErrorToast(error) showErrorToast(error) Loading