I've pushed a first attempt to handle usage accross filesystems in UoWFile.
Here is the choosen strategy for file moves: - atomic move attempt (File#renameTo) - if it fails, fallback to a copy/delete operation - log a warning when the copy/delete operation completes - report errors on copy/delete operation only WDYT? /Paul Niclas Hedhman a écrit :
Ok, so I have been digging more in this; There is the same problem inside the I/O package, where temporary files are used and then renamed. I guess this is a pretty nasty generic problem, that we should address across the board. (I also found the createTemp which was using system property(!), but that alone doesn't solve the problem.) Cheers Niclas On Sun, Jun 24, 2012 at 1:46 PM, Niclas Hedhman<[email protected]> wrote:Since File.renameTo() doesn't work across physical devices, UoWFile needs a different strategy. I can't easily figure out where things comes from, but the test has the original set to /var/folders/rk/g5qdsrnn4pl1jw6z1_p54llh0000gn/T/Application-1.0/uowfile-UoWFileFactory/fcd458e9-956d-402c-8796-a5843e2e3359-1.current.2 and the destination is build/null/fcd458e9-956d-402c-8796-a5843e2e3359-1 The 'null' is because of a System.getProperty("test"), which I think should not be required, but that is less important. I have qi4j-sdk located on a separate Volume than "/var" and renameTo() fails. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/6a2pl4j I relax here; http://tinyurl.com/2cgsug
_______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

