[BusyBox-cvs] svn commit: trunk/busybox/libbb
pgf at busybox.net
pgf at busybox.net
Tue Jul 19 20:47:34 UTC 2005
Author: pgf
Date: 2005-07-19 14:47:33 -0600 (Tue, 19 Jul 2005)
New Revision: 10862
Log:
applying fix from:
0000067: cp -p produces misleading error message
Modified:
trunk/busybox/libbb/copy_file.c
Changeset:
Modified: trunk/busybox/libbb/copy_file.c
===================================================================
--- trunk/busybox/libbb/copy_file.c 2005-07-19 20:41:06 UTC (rev 10861)
+++ trunk/busybox/libbb/copy_file.c 2005-07-19 20:47:33 UTC (rev 10862)
@@ -198,12 +198,16 @@
S_ISSOCK(source_stat.st_mode) || S_ISFIFO(source_stat.st_mode) ||
S_ISLNK(source_stat.st_mode)) {
- if (dest_exists &&
- ((flags & FILEUTILS_FORCE) == 0 || unlink(dest) < 0)) {
+ if (dest_exists) {
+ if((flags & FILEUTILS_FORCE) == 0) {
+ fprintf(stderr, "`%s' exists\n", dest);
+ return -1;
+ }
+ if(unlink(dest) < 0) {
bb_perror_msg("unable to remove `%s'", dest);
return -1;
-
}
+ }
} else {
bb_error_msg("internal error: unrecognized file type");
return -1;
More information about the busybox-cvs
mailing list