Remote edition: Detect changes in remote file

Advertisement

pe-rl
Joined:
Posts:
1

Remote edition: Detect changes in remote file

Hi,

I use winscp every day to edit remote files. I just double-click on a file in winscp, and it is automatically downloaded and opened in my local editor (vim). Every time I save the file, winscp automatically uploads the file and overwrites the remote one. It is very useful.

Sometimes I have a problem: While I was modifing the file, someone has modified the remote file, and if I save the file, the file is uploaded and the remote file is overwritten, so the changes made by the other person are lost.

I think that the problem could be easily solved if, before uploading the file, winscp reads the timestamp of the remote file, and if it is newer than the last time, then show a warning to the user: "The remote file has been modified. What do you want to do? 1. Overwrite remote file (remote changes will be lost). 2. Download remote file (local changes will be lost). 3. Save with other name (button to open dialog to choose directore and filename)".

That is the way "Remote system explorer" works (it is a plugin for eclipse, to work with remote files via ssh/sftp). But I would like to keep using winscp+vim instead of eclipse+rse. Is it possible to implement the proposal in winscp?

Thank you for creating a so good piece of code.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum