Fixed name shadowing

This commit is contained in:
Robinson 2023-01-02 15:41:43 +01:00
parent c26c326967
commit b929809bc7
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -1295,9 +1295,9 @@ object FileUtil {
if (name == fileToExtract) {
val tempFile = tempFile(name)
tempFile.deleteOnExit()
val output = FileOutputStream(tempFile)
output.use { output ->
inputStream.copyTo(output)
val tempOutput = FileOutputStream(tempFile)
tempOutput.use {
inputStream.copyTo(it)
}
return tempFile.absolutePath
}