sramazzina commented on PR #3659:
URL: https://github.com/apache/hop/pull/3659#issuecomment-1959310877

   Basically the overwrite happened without any changes too, I was unable to 
reproduce the error the reporter experienced. But by performing the test I 
experienced another issue and that was the reason of the proposed change.
   
   Suppose that we are copying a new text file over an existing one:
   - The target file, present in the destination directory, contained the 
following sample text: THIS IS A SAMPLE
   - The file that we are going to copy contains the following text: APACHE HOP
   The file that resulted after the copy was something like APACHE HOPSAMPLE. 
   
   Basically, the behavior of the copyFrom API is that it overwrites the file 
but in terms of bytes. I mean, the first 10 bytes of the target file will be 
overwritten with the content of the new file (that is 10 byte in size of 
course). I tried to investigate on the copyFrom API but I wasn0t able to find 
something related to this behavior. Therefore, for this reason, I decided to 
delete the target before the copy to be sure that the ovewrite will happen 
properly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to