This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

rsync under cygwin

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,


Want to unsubscribe from this list?
Send a message to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]