This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
rsync under cygwin
- To: <cygwin at sourceware dot cygnus dot com>,<tridge at samba dot org>,<paulus at cs dot anu dot edu dot au>
- Subject: rsync under cygwin
- From: "Vlad Soutyrine" <vlad at softaware dot com>
- Date: Thu, 29 Jun 2000 13:29:26 -0700
- Cc: <corinna at vinschen dot de>,<sos at prospect dot com dot ru>
- Reply-To: <vlad at softaware dot com>
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
rsync-2.4.3.cygwin.diff
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com