delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/19/12:03:37

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 <corinna-cygwin AT cygwin DOT com>
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: <CAK+PQdiH4-OJ=1tYa6ca7V2efJkkrF76aLsHgmnZf1LCt9jBog AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAK+PQdiH4-OJ=1tYa6ca7V2efJkkrF76aLsHgmnZf1LCt9jBog@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019