1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-05 08:10:15 +02:00

(copy_internal): Set *rename_succeeded, so that

the caller (mv) doesn't remove the source file.
This commit is contained in:
Jim Meyering
2001-08-06 17:29:15 +00:00
parent 053a9d88ee
commit 01f160092e
+7 -1
View File
@@ -653,7 +653,13 @@ copy_internal (const char *src_path, const char *dst_path,
}
if (x->update && MTIME_CMP (src_sb, dst_sb) <= 0)
return 0;
{
/* Pretend the rename succeeded, so the caller (mv)
doesn't end up removing the source file. */
if (rename_succeeded)
*rename_succeeded = 1;
return 0;
}
}
if (!S_ISDIR (src_type) && x->interactive)