mv: Prevent successful rename from forgetting past failure
This commit is contained in:
parent
1cc5a57fd7
commit
688384568c
2
mv.c
2
mv.c
@ -16,7 +16,7 @@ mv(const char *s1, const char *s2, int depth)
|
|||||||
struct recursor r = { .fn = rm, .follow = 'P' };
|
struct recursor r = { .fn = rm, .follow = 'P' };
|
||||||
|
|
||||||
if (!rename(s1, s2))
|
if (!rename(s1, s2))
|
||||||
return (mv_status = 0);
|
return 0;
|
||||||
if (errno == EXDEV) {
|
if (errno == EXDEV) {
|
||||||
cp_aflag = cp_rflag = cp_pflag = 1;
|
cp_aflag = cp_rflag = cp_pflag = 1;
|
||||||
cp_follow = 'P';
|
cp_follow = 'P';
|
||||||
|
Loading…
Reference in New Issue
Block a user