<@U092308M7> The following code throws, is this th...
# stdlib
c
@orangy The following code throws, is this the expected behavior? It looks like
copyRecursively
is changing the target from a directory to a file:
Copy code
fun main(args: Array<String>) {
    val from = File("/tmp/foo").apply { writeText("I'm a file") }
    val to = File("/tmp/to").apply {
        deleteRecursively()
        mkdirs()
    }
    from.copyRecursively(to, overwrite = true)
    if (! to.isDirectory) {
        throw AssertionError("Should be a directory")
    }
}
o
I don’t have any idea right now, could you file an issue, or even debug it and tell us what’s wrong?
c
I think it’s happening in
copyTo
, which
copyRecursively
calls. Haven’t dug further