|
@@ -112,9 +112,17 @@ object FileUtil {
|
|
|
else -> {}
|
|
|
}
|
|
|
}
|
|
|
+ var inputStream: FileInputStream? = null
|
|
|
+ var outputStream: FileOutputStream? = null
|
|
|
try {
|
|
|
- copyFile(FileInputStream(srcFilePath), FileOutputStream(dstFilePath))
|
|
|
- } catch (e: Exception) {}
|
|
|
+ inputStream = FileInputStream(srcFilePath)
|
|
|
+ outputStream = FileOutputStream(dstFilePath)
|
|
|
+ copyFile(inputStream, outputStream)
|
|
|
+ } catch (e: Exception) {
|
|
|
+
|
|
|
+ } finally {
|
|
|
+ CloseUtils.closeIO(inputStream, outputStream)
|
|
|
+ }
|
|
|
return dstFilePath.absolutePath
|
|
|
}
|
|
|
|