Backup file extension fix
This commit is contained in:
parent
7c142490ed
commit
141ab9f70c
|
@ -105,7 +105,7 @@ fun Context.backupContacts() {
|
||||||
mkdirs()
|
mkdirs()
|
||||||
}
|
}
|
||||||
|
|
||||||
var exportFile = File(outputFolder, "$filename.json")
|
var exportFile = File(outputFolder, "$filename.vcf")
|
||||||
var exportFilePath = exportFile.absolutePath
|
var exportFilePath = exportFile.absolutePath
|
||||||
val outputStream = try {
|
val outputStream = try {
|
||||||
if (hasProperStoredFirstParentUri(exportFilePath)) {
|
if (hasProperStoredFirstParentUri(exportFilePath)) {
|
||||||
|
@ -118,7 +118,7 @@ fun Context.backupContacts() {
|
||||||
var num = 0
|
var num = 0
|
||||||
while (getDoesFilePathExist(exportFilePath) && !exportFile.canWrite()) {
|
while (getDoesFilePathExist(exportFilePath) && !exportFile.canWrite()) {
|
||||||
num++
|
num++
|
||||||
exportFile = File(outputFolder, "${filename}_${num}.json")
|
exportFile = File(outputFolder, "${filename}_${num}.vcf")
|
||||||
exportFilePath = exportFile.absolutePath
|
exportFilePath = exportFile.absolutePath
|
||||||
}
|
}
|
||||||
FileOutputStream(exportFile)
|
FileOutputStream(exportFile)
|
||||||
|
|
Loading…
Reference in New Issue