[hackers] [sbase] mv: Move on to other files if rename fails with something other than EXDEV || Michael Forney

From: <git_AT_suckless.org>
Date: Fri, 30 Jul 2021 21:36:09 +0200 (CEST)

commit 7d60e2cabbe07495ee74f3d5e705f1e3470148eb
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Fri Jul 30 12:18:32 2021 -0700
Commit: Michael Forney <mforney_AT_mforney.org>
CommitDate: Fri Jul 30 12:24:32 2021 -0700

    mv: Move on to other files if rename fails with something other than EXDEV

diff --git a/mv.c b/mv.c
index 0cda443..8441f9c 100644
--- a/mv.c
+++ b/mv.c
_AT_@ -27,11 +27,12 @@ mv(const char *s1, const char *s2, int depth)
                         recurse(AT_FDCWD, s1, NULL, &r);
                 if (cp_status || rm_status)
                         mv_status = 1;
- return 0;
+ } else {
+ weprintf("%s -> %s:", s1, s2);
+ mv_status = 1;
         }
- mv_status = 1;
 
- return -1;
+ return 0;
 }
 
 static void
Received on Fri Jul 30 2021 - 21:36:09 CEST

This archive was generated by hypermail 2.3.0 : Fri Jul 30 2021 - 21:36:36 CEST