Subject: rsync under cygwin
From: "Vlad Soutyrine" <[email-masked]>
To: <[email-masked]>, <[email-masked]>, <[email-masked]>
Cc: <[email-masked]>, <[email-masked]>
Date: Thu, 29 Jun 2000 13:29:26 -0700

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

--
Want to unsubscribe from this list?
Send a message to [email-masked]