delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/10/31/17:04:04

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
X-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3BE0753C.A6353A5F@yahoo.com>
Date: Wed, 31 Oct 2001 17:03:40 -0500
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: CA List <Cygwin-Apps AT Cygwin DOT Com>
X-Mailer: Mozilla 4.77 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: CA List <Cygwin-Apps AT Cygwin DOT Com>
Subject: Fileutils-4.1-1 patch

This is a multi-part message in MIME format.
--------------6D78C5C3FF11558A549B45BB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Attached is a change I made because I was tired of mv copying my
directories when that's not what I desired.  An appropriate Makefile.in
or configure.in change should be made to set ALLOW_COPY_ON_RENAME_FAIL
macro to be set but I'm not interested in that change.

-- 
Earnie.
--------------6D78C5C3FF11558A549B45BB
Content-Type: text/plain; charset=us-ascii;
 name="fileutils.diff.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="fileutils.diff.txt"

2001.10.31  Earnie Boyd  <earnie AT users DOT sf DOT net>

	* src/copy.c (copy_internal): Add CPP filter for 
	ALLOW_COPY_ON_RENAME_FAIL for existing code #else give error and
	return 1.

--- stable/fileutils/4.1/1/src/copy.c	Fri Jun 15 15:20:08 2001
+++ sandbox/fileutils/4.1/2/src/copy.c	Wed Oct 31 16:32:59 2001
@@ -833,7 +833,7 @@ copy_internal (const char *src_path, con
 	    *rename_succeeded = 1;
 	  return 0;
 	}
-
+#if ALLOW_COPY_ON_RENAME_FAIL
       /* FIXME: someday, consider what to do when moving a directory into
 	 itself but when source and destination are on different devices.  */
 
@@ -883,6 +883,11 @@ copy_internal (const char *src_path, con
 	}
 
       new_dst = 1;
+#else /* ! ALLOW_COPY_ON_RENAME_FAIL */
+      error (0, rename_errno, _("cannot move %s to %s"), quote_n (0, src_path),
+	     quote_n (1, dst_path));
+      return 1;
+#endif /* ! ALLOW_COPY_ON_RENAME_FAIL */
     }
 
   delayed_fail = 0;

--------------6D78C5C3FF11558A549B45BB--


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

- Raw text -


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