diff options
author | Rob Landley <rob@landley.net> | 2023-07-20 09:02:17 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2023-07-20 09:02:17 -0500 |
commit | ec3e49c93b07bf494ccb01d80ad0e5f62bfd0a55 (patch) | |
tree | dcd0ccf2c773870d010677141a14ec3bd1e58c18 /toys/posix/cp.c | |
parent | daba016e2f08db95b17c481cbef3f0f18d6246bc (diff) | |
download | toybox-ec3e49c93b07bf494ccb01d80ad0e5f62bfd0a55.tar.gz |
mv across partitions should --preserve=all
Diffstat (limited to 'toys/posix/cp.c')
-rw-r--r-- | toys/posix/cp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c index c11da163..a9ab42d6 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -429,7 +429,7 @@ void cp_main(void) // "mv across devices" triggers cp fallback path, so set that as default errno = EXDEV; - if (CFG_MV && toys.which->name[0] == 'm') { + if (CFG_MV && *toys.which->name == 'm') { if (!FLAG(f) || FLAG(n)) { struct stat st; int exists = !stat(TT.destname, &st); @@ -462,6 +462,7 @@ void cp_main(void) void mv_main(void) { toys.optflags |= FLAG_d|FLAG_p|FLAG_r; + TT.pflags =~0; cp_main(); } |