projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
053a9d8
)
(copy_internal): Set *rename_succeeded, so that
author
Jim Meyering
<jim@meyering.net>
Mon, 6 Aug 2001 17:29:15 +0000
(17:29 +0000)
committer
Jim Meyering
<jim@meyering.net>
Mon, 6 Aug 2001 17:29:15 +0000
(17:29 +0000)
the caller (mv) doesn't remove the source file.
src/copy.c
patch
|
blob
|
history
diff --git
a/src/copy.c
b/src/copy.c
index bc4b41065ceb8e3ed1d6f42f7e933dd5aac9c944..1096fba237b51b7823b79aea2e4717993c1a114f 100644
(file)
--- a/
src/copy.c
+++ b/
src/copy.c
@@
-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)