Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.0.0, 2.0.0
-
None
-
Windows
Description
Distributed version of download-storm-code uses Files#move().
It runs well on *Nix (including OSX) but fails on Windows.
Javadoc describes this behavior, please refer below link.
https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#move(java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.CopyOption...)
When invoked to move a directory that is not empty then the directory is moved if it does not require moving the entries in the directory. For example, renaming a directory on the same FileStore will usually not require moving the entries in the directory. When moving a directory requires that its entries be moved then this method fails (by throwing an IOException). To move a file tree may involve copying rather than moving directories and this can be done using the copy method in conjunction with the Files.walkFileTree utility method.
If directory is not empty, file system should treat "move directory" as "rename".
Unfortunately, file system on Windows 8 doesn't.
We should change the way to be compatible with both kinds of OS.