Closed ihudedi closed 3 years ago
Hi Itay,
please post some stacktrace here.
I checked the AS2IOHelper.moveFile
and it actually does copy + delete.
I scanned the sources and I don't see any call to renameTo
.
Thanks, Philip
Hi Philip, You can see it in AS2IOHelper.getFileOperationManager ().renameFile This method actual call the renameTo in java.io You can search for all occurancies. It's exist in AbstractStorageModule::store Thanks, Itay
Thanks Itay for pointing me to the right place - too many abstraction layers in place ;-) Fixed in the latest SNAPSHOT. Will be part of of the 4.6.3 release
Hi Philip, Do you know when 4.6.3 is going to be released? Thanks, Itay
Work in progress - on Maven Central within the next half hour
Thanks a lot for the quick response. Itay
Hi Philip, We have an issue when the AS2 code trying to rename the file from tempDir to the target. When the tempDir and the target aren't on the same file system we are getting IOException when trying to rename file. You are using renameTo method in java.io.File Could you please modify the code to use move operation in nio package java.nio.file.Files#move(oldPath,newPath,StandardCopyOption.ATOMIC_MOVE,StandardCopyOption.REPLACE_EXISITING) You use the tempDir in some places in your code when you store the as2 message ,mdn etc. Please see the attached link https://stackoverflow.com/questions/6080295/how-to-rename-a-file-using-java-io-packages#6080330 Thanks, Itay