Hi, we have the following scenario:
Two SFTP processes acting on the same source and destination directories both start at exactly the same time.
Process A gets a list of files to transfer and starts downloading the first file, maybe a split second before Process B starts. It then creates a file on the destination with the same name. Process B comes along, and using that same file list, tries to download the same file, but first checks the destination and sees that the file exists there because it has just been created by Process A, and tries to delete it but can't because it's still locked by Process A (if, say, it's a large file), and so it fails to perform the transfer. It then retries to transfer the file and this time, when it checks the destination to see if it exists, it finds it, and now that Process A has finished downloading, Process B deletes it! So at this point the file gets lost, since Process A deleted it from the source and Process B deleted it from the destination.
What we'd like to know is, why does the process first implicitly delete the file from the destination, even though it doesn't actually have a source file to transfer? And is there any way to prevent this?
Thanks