rsync under cygwin

Vlad Soutyrine vlad@softaware.com
Thu Jun 29 13:49:00 GMT 2000


Dear rsync developers,

I've been testing rsync under cygwin on NT.
It works great, with one exception.

If a file that rsync is supposed to replace is open by other application,
rsync cannot replace the file even if it is opened in a shared mode.  This
in particular happens when rsync is trying to replace a file that is being
served by IIS as a web content.

I was able to resolve the issue with a minor modification of rsync code.
When the described above situation happens (in rsync.c) I make a copy of
file instead of renaming it by calling function copy_file from util.c.  I
also had to modify function copy_file not to delete file before opening it,
but to truncate file during the opening.

This seems to solve the problem.
The patch is attached.

Cygwin developers, could you please review the patch, and see if there is a
better solution.

I hope it will be taken into account on next rsync release.
I have preserved the code for all other platforms, but cigwin.

Thank you very much for your consideration,
Vlad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsync-2.4.3.cygwin.diff
Type: text/x-diff
Size: 1449 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20000629/87bef127/attachment.bin>


More information about the Cygwin mailing list