Do not call mkdirs when destination file of copyTo doesn't have any parent directory.
#KT-7888 Fixed
This commit is contained in:
@@ -218,7 +218,7 @@ public fun File.copyTo(dst: File, overwrite: Boolean = false, bufferSize: Int =
|
||||
return copyTo(dst.resolve(name), overwrite, bufferSize)
|
||||
}
|
||||
}
|
||||
dst.getParentFile().mkdirs()
|
||||
dst.getParentFile()?.mkdirs()
|
||||
dst.delete()
|
||||
val input = FileInputStream(this)
|
||||
return input.use<FileInputStream, Long> {
|
||||
|
||||
Reference in New Issue
Block a user