aboutsummaryrefslogtreecommitdiff
path: root/cp_mv.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-09 22:48:12 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-09 22:48:12 +0000
commit88ea4d5576ceec648bff7f9bbf919fd3ecdff67b (patch)
treeef367ee8a9096884fb40debdc9e10af8583f9d5f /cp_mv.c
parentada3b10c6a1ad210d6bf4078859792562636f27e (diff)
downloadbusybox-w32-88ea4d5576ceec648bff7f9bbf919fd3ecdff67b.tar.gz
busybox-w32-88ea4d5576ceec648bff7f9bbf919fd3ecdff67b.tar.bz2
busybox-w32-88ea4d5576ceec648bff7f9bbf919fd3ecdff67b.zip
Apply Vladimir's latest cleanup patch.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@2288 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'cp_mv.c')
-rw-r--r--cp_mv.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/cp_mv.c b/cp_mv.c
index fb48d3c5c..f4b5cd0d6 100644
--- a/cp_mv.c
+++ b/cp_mv.c
@@ -256,18 +256,16 @@ extern int cp_mv_main(int argc, char **argv)
256 int state = 0; 256 int state = 0;
257 char *pushd, *d, *p; 257 char *pushd, *d, *p;
258 258
259 if ((pushd = getcwd(NULL, BUFSIZ + 1)) == NULL) { 259 if ((pushd = xgetcwd(0)) == NULL)
260 perror_msg("getcwd()");
261 continue; 260 continue;
262 } 261
263 if (chdir(baseDestName) < 0) { 262 if (chdir(baseDestName) < 0) {
264 perror_msg("chdir(%s)", baseSrcName); 263 perror_msg("chdir(%s)", baseSrcName);
265 continue; 264 continue;
266 } 265 }
267 if ((d = getcwd(NULL, BUFSIZ + 1)) == NULL) { 266 if ((d = xgetcwd(0)) == NULL)
268 perror_msg("getcwd()");
269 continue; 267 continue;
270 } 268
271 while (!state && *d != '\0') { 269 while (!state && *d != '\0') {
272 if (stat(d, &sb) < 0) { /* stat not lstat - always dereference targets */ 270 if (stat(d, &sb) < 0) { /* stat not lstat - always dereference targets */
273 perror_msg("stat(%s)", d); 271 perror_msg("stat(%s)", d);