aboutsummaryrefslogtreecommitdiff
path: root/coreutils/mv.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/mv.c')
-rw-r--r--coreutils/mv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/coreutils/mv.c b/coreutils/mv.c
index c28d0500e..4f08dedc0 100644
--- a/coreutils/mv.c
+++ b/coreutils/mv.c
@@ -75,7 +75,7 @@ extern int mv_main(int argc, char **argv)
75 goto DO_MOVE; 75 goto DO_MOVE;
76 } 76 }
77 } 77 }
78 78
79 do { 79 do {
80 dest = concat_path_file(last, bb_get_last_path_component(*argv)); 80 dest = concat_path_file(last, bb_get_last_path_component(*argv));
81 81
@@ -84,7 +84,7 @@ extern int mv_main(int argc, char **argv)
84 } 84 }
85 85
86DO_MOVE: 86DO_MOVE:
87 87
88 if (dest_exists && !(flags & OPT_FILEUTILS_FORCE) && 88 if (dest_exists && !(flags & OPT_FILEUTILS_FORCE) &&
89 ((access(dest, W_OK) < 0 && isatty(0)) || 89 ((access(dest, W_OK) < 0 && isatty(0)) ||
90 (flags & OPT_FILEUTILS_INTERACTIVE))) { 90 (flags & OPT_FILEUTILS_INTERACTIVE))) {
@@ -119,7 +119,7 @@ DO_MOVE:
119 bb_perror_msg("cannot remove `%s'", dest); 119 bb_perror_msg("cannot remove `%s'", dest);
120 goto RET_1; 120 goto RET_1;
121 } 121 }
122 } 122 }
123 if ((copy_file(*argv, dest, 123 if ((copy_file(*argv, dest,
124 FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS) >= 0) && 124 FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS) >= 0) &&
125 (remove_file(*argv, FILEUTILS_RECUR | FILEUTILS_FORCE) >= 0)) { 125 (remove_file(*argv, FILEUTILS_RECUR | FILEUTILS_FORCE) >= 0)) {
@@ -132,7 +132,7 @@ RET_1:
132RET_0: 132RET_0:
133 if (dest != last) { 133 if (dest != last) {
134 free((void *) dest); 134 free((void *) dest);
135 } 135 }
136 } while (*++argv != last); 136 } while (*++argv != last);
137 137
138 return (status); 138 return (status);