musikr: close cover output streams
This commit is contained in:
parent
292ea9d8a1
commit
b05d668b5e
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ private class CoverFilesImpl(private val dir: File) : CoverFiles {
|
||||||
val tempFile = File(dir, "$name.tmp")
|
val tempFile = File(dir, "$name.tmp")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
block(tempFile.outputStream())
|
tempFile.outputStream().use { block(it) }
|
||||||
tempFile.renameTo(targetFile)
|
tempFile.renameTo(targetFile)
|
||||||
CoverFileImpl(targetFile)
|
CoverFileImpl(targetFile)
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
|
|
Loading…
Reference in a new issue