mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-04-04 21:37:37 +03:00
parent
319da4b174
commit
d217b52744
2 changed files with 14 additions and 3 deletions
|
@ -12,8 +12,8 @@ android {
|
|||
applicationId "com.kunzisoft.keepass"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 31
|
||||
versionCode = 106
|
||||
versionName = "3.4.0_beta01"
|
||||
versionCode = 107
|
||||
versionName = "3.4.0_beta02"
|
||||
multiDexEnabled true
|
||||
|
||||
testApplicationId = "com.kunzisoft.keepass.tests"
|
||||
|
|
|
@ -69,7 +69,18 @@ object UriUtil {
|
|||
return null
|
||||
return when {
|
||||
isFileScheme(fileUri) -> fileUri.path?.let { FileOutputStream(it) }
|
||||
isContentScheme(fileUri) -> contentResolver.openOutputStream(fileUri, "rwt")
|
||||
isContentScheme(fileUri) -> {
|
||||
try {
|
||||
contentResolver.openOutputStream(fileUri, "wt")
|
||||
} catch (e: FileNotFoundException) {
|
||||
Log.e(TAG, "Unable to open stream in `wt` mode, retry in `rwt` mode.", e)
|
||||
// https://issuetracker.google.com/issues/180526528
|
||||
// Try with rwt to fix content provider issue
|
||||
val outStream = contentResolver.openOutputStream(fileUri, "rwt")
|
||||
Log.w(TAG, "`rwt` mode used.")
|
||||
outStream
|
||||
}
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue