summaryrefslogtreecommitdiff
path: root/src/ln.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-12-11 08:40:10 +0000
committerJim Meyering <jim@meyering.net>1997-12-11 08:40:10 +0000
commita320eee15855e557ce07c3d47cb262484b139846 (patch)
tree7334a9e2568b64b7f7f2a83e2d44aedf3d6a0336 /src/ln.c
parent603137e2ab769ccda196142fb6809cab3bbfee35 (diff)
downloadcoreutils-a320eee15855e557ce07c3d47cb262484b139846.tar.xz
(do_link): Don't require --force when target exists and
using --backup. This changes makes ln consistent with cp and mv in this respect. Suggestion from Eli Zaretskii.
Diffstat (limited to 'src/ln.c')
-rw-r--r--src/ln.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ln.c b/src/ln.c
index b7a5208a9..6078f48d0 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -257,7 +257,7 @@ do_link (const char *source, const char *dest)
if (!yesno ())
return 0;
}
- else if (!remove_existing_files)
+ else if (!remove_existing_files && backup_type == none)
{
error (0, 0, _("%s: File exists"), dest);
return 1;