Mail Archives: cygwin-apps/2001/10/31/17:04:04
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 -