Fix: Fix exception conversion in FtpCopyMove

This commit is contained in:
Hai Zhang 2024-02-25 17:52:19 -08:00
parent 120ddc6756
commit 4469d66ad2

View File

@ -79,7 +79,7 @@ internal object FtpCopyMove {
try {
targetOutputStream.close()
} catch (e: IOException) {
throw IOException(e).toFileSystemExceptionForFtp(target.toString())
throw e.toFileSystemExceptionForFtp(target.toString())
} finally {
if (!successful) {
try {
@ -94,7 +94,7 @@ internal object FtpCopyMove {
try {
sourceInputStream.close()
} catch (e: IOException) {
throw IOException(e).toFileSystemExceptionForFtp(source.toString())
throw e.toFileSystemExceptionForFtp(source.toString())
}
}
}