X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 19 Dec 2011 18:02:43 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: rsync of windows shortcuts creates foo and foo.lnk - never fully synchronizes Message-ID: <20111219170243.GA32452@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Dec 18 11:52, Fred Wheeler wrote: > I am seeing strange rsync behavior in cygwin when synchronizing > directories that contain windows shortcuts. When a shortcut foo.lnk > gets modified, rsync creates both a foo and foo.lnk file in the > receiving side. Repeated runs of rsync print output as if the extra > file is removed, but it never really is. The test case below > demonstrates the problem. > > cygcheck.out attached. > I've been having this problem for a while - maybe a couple of years. > > # create 2 working directories > mkdir /tmp/A > mkdir /tmp/B > > # create a directory to sync > mkdir /tmp/A/foo > > # create a shortcut > cd /tmp/A/foo > mkshortcut \ > --arguments="mintty" \ > --name="winshortcut" \ > --workingdir="$HOME" \ > /bin/run > > # rsync 'foo' - works fine > rsync -rt --itemize-changes --update --delete /tmp/A/foo /tmp/B > # 2nd rsync does nothing - as expected > rsync -rt --itemize-changes --update --delete /tmp/A/foo /tmp/B > > # files in each synced directory look fine - same time stamp and size > ls -l /tmp/A/foo > ls -l /tmp/B/foo > > # touch the shortcut > touch /tmp/A/foo/winshortcut.lnk > > # here is where the proble first happens I think > # rsync 'foo' - appears to work fine > rsync -rt --itemize-changes --update --delete /tmp/A/foo /tmp/B Thanks for the report. I see where the problem occurs. It's one of the hoops the rename(2) function jumps through to support .lnk-style symlinks which has a buggy condition. This should be fixed in CVS. If you're not set up to build your own Cygwin, please give the next developer snapshot a try. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple