delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; q=dns; s=default; b=UbR/k+spUvqpqe0E | |
LkG5lX8nf6JZknUMt1xdsBItgxSlZ+F/5LjUoXy1O3ATfL+ZItso+AQPj70X8Lq/ | |
hCPl5R02KRK5188BagLJ9zs81wv4ddi31w2o4bz+7g1oAJSMZBaukunk1aRItyVE | |
5KAzxrdKg3VQeU0Rp2xzDTUv/80= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; s=default; bh=eBVHuzpdnMJ+NKLKlkiufy | |
xW/F8=; b=Doy4/U1w7ra3H6r148jAcpQBK3sggT77Refad9gkwwPK1voEh40Ok6 | |
+qolqZZdMQReu4hbnmDt+Qw03cS1LH7/mcHYg2KchFV/MHL3a9HgjCa0oUp6VxSH | |
jUBnCRZ7/jQz5EMgjyhCcoDbkCkOzZXTOlS8JV52Xm0c4JUhVgd30= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 |
X-Spam-SWARE-Status: | No, score=-0.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_THEBAT,KHOP_THREADED,SPF_SOFTFAIL autolearn=no version=3.3.1 |
Date: | Fri, 29 Mar 2013 19:31:40 +0400 |
From: | Andrey Repin <anrdaemon AT freemail DOT ru> |
Reply-To: | Andrey Repin <cygwin AT cygwin DOT com> |
Message-ID: | <1846269758.20130329193140@mtu-net.ru> |
To: | Bill Priest <priestwilliaml AT gmail DOT com>, cygwin AT cygwin DOT com |
Subject: | Re: cp "skipping file ..., as it was replaced while being copied |
In-Reply-To: | <CAP_ScW1ARAqsKF8yADP4ZRzkF1COCo9GRWjX=-kFrwOsM-aCmQ@mail.gmail.com> |
References: | <CAP_ScW1ARAqsKF8yADP4ZRzkF1COCo9GRWjX=-kFrwOsM-aCmQ AT mail DOT gmail DOT com> |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Greetings, Bill Priest! > All, > I've been using a program/device driver that maps an FTP site to a > windows drive (yes I know about the Windows 7 way to do almost the > same thing; but I could only get to the share using windows explorer > and not cygwin) and things work pretty well except when I try to do a > simple cp file1.txt file2.txt I get the following: > /usr/bin/cp: skipping file `file1.txt', as it was replaced while being copied > I found the "offending" code in copy.c and commented it out and the > resulting excutable then "works". I'm not sure why the inodes are the > same for both files. I've never seen this w/ samba or "normal" > network shares; I guess it is a bug in the driver implementation > (however, mv file1.txt file2.txt, cat file1.txt > file2.txt, and other > commands I have tried work w/o issue). I'm not sure what the code is > trying to protect against (once the open works shouldn't you be able > to trust the OS that the rest will work)?? > I'm not reporting this as a bug as much as trying intellectual > curiosity of why the code is doing it. Search archives, this is not the first time this issue is brought to light. TL;DR: your bridge program does not behave as proper FS. That aside, why you are not using more efficient and secure means of file transfer? > Bill > diff -u copy.c~ copy.c > --- copy.c~ 2013-03-28 13:48:47.923995100 -0500 > +++ copy.c 2013-03-29 08:49:03.795004400 -0500 > @@ -835,6 +835,7 @@ > /* Compare the source dev/ino from the open file to the incoming, > saved ones obtained via a previous call to stat. */ > +#if 0 > if (! SAME_INODE (*src_sb, src_open_sb)) > { > error (0, 0, > @@ -843,7 +844,7 @@ > return_val = false; > goto close_src_desc; > } > - > +#endif > /* The semantics of the following open calls are mandated > by the specs for both cp and mv. */ > if (! *new_dst) > -- > 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 -- WBR, Andrey Repin (anrdaemon AT freemail DOT ru) 29.03.2013, <19:29> Sorry for my terrible english... -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |