summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>1999-12-29 02:10:35 +0000
committerErik Andersen <andersen@codepoet.org>1999-12-29 02:10:35 +0000
commit2fe08c7afb3ddef42f304e78cb6edfa28e0741ef (patch)
tree2c44125f9324373494668c513c31be2a172a54d4 /utility.c
parent00266d3df6ba8dcc6247f112372a0ce5a8ab2c32 (diff)
downloadbusybox-w32-2fe08c7afb3ddef42f304e78cb6edfa28e0741ef.tar.gz
busybox-w32-2fe08c7afb3ddef42f304e78cb6edfa28e0741ef.tar.bz2
busybox-w32-2fe08c7afb3ddef42f304e78cb6edfa28e0741ef.zip
Fixed cp so it works as God intended it to.
-Erik
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/utility.c b/utility.c
index d01be9c98..d042b9910 100644
--- a/utility.c
+++ b/utility.c
@@ -151,7 +151,8 @@ copyFile( const char *srcName, const char *destName,
151 if (S_ISDIR(srcStatBuf.st_mode)) { 151 if (S_ISDIR(srcStatBuf.st_mode)) {
152 //fprintf(stderr, "copying directory %s to %s\n", srcName, destName); 152 //fprintf(stderr, "copying directory %s to %s\n", srcName, destName);
153 /* Make sure the directory is writable */ 153 /* Make sure the directory is writable */
154 if (mkdir(destName, 0777777 ^ umask(0))) { 154 result = mkdir(destName, 0777777 ^ umask(0));
155 if (result < 0 && errno != EEXIST) {
155 perror(destName); 156 perror(destName);
156 return (FALSE); 157 return (FALSE);
157 } 158 }
@@ -478,7 +479,7 @@ recursiveAction(const char *fileName, int recurse, int followLinks, int depthFir
478 479
479 480
480 481
481#if defined (BB_TAR) || defined (BB_MKDIR) 482#if defined (BB_TAR) || defined (BB_MKDIR) || defined (BB_CP)
482/* 483/*
483 * Attempt to create the directories along the specified path, except for 484 * Attempt to create the directories along the specified path, except for
484 * the final component. The mode is given for the final directory only, 485 * the final component. The mode is given for the final directory only,