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:mime-version:date:message-id:subject:from:to :content-type; q=dns; s=default; b=su3QUncwNJrQizcv2lBJtXAUfqBhM IjBtFOW5cfTfNA9sZZcvgEVmP4gxfNpQLLvipLEJFuRNXoNceChVdxDq9XiqRMwm ceC527BpXPT+zbjrx47V+YcyXNBObhKUrXZ/7bV4B7mZtQREzEHTDk70OV4+a2Te N3nHXthwsOoeRM= 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:mime-version:date:message-id:subject:from:to :content-type; s=default; bh=5y5KFxEEBEcEWxVfRrDLhCI18hs=; b=TMb IX+aS4OPLlvl5dO+Y8bbPyL13AkFZIBvhTu9PTlhdsJ5kDplmGvc5MVTZ7lKYVEk omdkvFpk8+rAhJ2kkhRrFcSSW01vNV4+xaTqS1JOrx+C0lmWyJkkUO4m2YVC3ti8 a+mvUato79xVTzM/UrNoJhGveePCT3tg4jm2Aar8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.1 MIME-Version: 1.0 X-Received: by 10.50.212.3 with SMTP id ng3mr1658028igc.43.1364566273801; Fri, 29 Mar 2013 07:11:13 -0700 (PDT) Date: Fri, 29 Mar 2013 09:11:13 -0500 Message-ID: Subject: cp "skipping file ..., as it was replaced while being copied From: Bill Priest To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 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. 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