Moved mkdirs() to getFints4kClientDataFile()
This commit is contained in:
parent
2d30047c75
commit
12f61b03ef
|
@ -176,8 +176,6 @@ open class fints4kBankingClient(
|
||||||
try {
|
try {
|
||||||
val clientDataFile = getFints4kClientDataFile()
|
val clientDataFile = getFints4kClientDataFile()
|
||||||
|
|
||||||
clientDataFile.parent?.mkdirs()
|
|
||||||
|
|
||||||
serializer.serializeObject(fints4kCustomer, clientDataFile)
|
serializer.serializeObject(fints4kCustomer, clientDataFile)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
log.error("Could not save customer data for $fints4kCustomer", e)
|
log.error("Could not save customer data for $fints4kCustomer", e)
|
||||||
|
@ -185,7 +183,11 @@ open class fints4kBankingClient(
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open fun getFints4kClientDataFile(): File {
|
protected open fun getFints4kClientDataFile(): File {
|
||||||
return File(File(dataFolder, "fints4k-client"), "${bank.bankCode}_${fints4kCustomer.customerId}_$fints4kClientDataFilename")
|
val folder = File(dataFolder, "fints4k-client")
|
||||||
|
|
||||||
|
folder.mkdirs()
|
||||||
|
|
||||||
|
return File(folder, "${bank.bankCode}_${fints4kCustomer.customerId}_$fints4kClientDataFilename")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue