> Looks to me like query/func/file/FileCopy.java uses Files.move() when > it thinks i can, but this will fail on Unix-like systems if you try to > move a file across file system boundaries (because then the kernel > would need to copy the data).
True, I thought similarly. It turns out these cases seems to be already considered by the Java implementation (if preferred, however, all this magic can be disabled via an ATOMIC_MOVE flag [1]). In found some entries reg. problems with Files.move in the JDK bug reports, but nothing that matches our observations in detail. So I think we’ll need to live with copy & delete for the moment until we can reproduce this more easily. [1] https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#move-java.nio.file.Path-java.nio.file.Path-java.nio.file.CopyOption...-