Re: Bug with resume? .filepart renamed on disconnect (until.
Moreover, it is AFAIK nonsense anyway. If the server closes connection in the middle of the transfer, WinSCP can hardly rename anything, if it looses connection.
Yes, I considered this when I first posted. I figured that the server process was somehow doing the renaming. I don't know anything about how SFTP works, but I guessed that maybe there was a control stream in which two commands had been enqueued, "upload" and "rename." Or maybe the network failure is initially asymmetric, so WinSCP bails because it isn't getting messages from the server, but the asymmetry of the failure lets WinSCP get the "rename" command out the door.
Really, I don't know. I'm talking out of my ass. But I am pretty sure the problem exists. I have reproduced it in front of my eyes at least twice with these steps:
- start an upload of "filename" with WinSCP
- log into shell on server, verify that file is called "filename.part" and that file size is actively growing
- unplug the ethernet cable from the back of my wireless AP
- wait a couple minutes for connection to die; plug ethernet cable back in
- log into shell on server, verify that file is now called "filename" but it's incomplete
If I can do anything to try to help track this down (like posting WinSCP or sshd logs if I can reproduce it again) let me know.
What I did: I was uploading file to the server. Meanwhile I've logged in using SSH terminal and killed process "sshd: <myusername>@notty".
I agree that if you manually kill the sshd process, it's going to be pretty much impossible for the file to be renamed. (Like you said, who would be there to rename it??) Instead, try interrupting the connection by killing the network link, like by unplugging your ethernet cable or disabling the network adapter in Windows.