From: Jim Meyering Date: Mon, 22 Aug 2005 10:31:55 +0000 (+0000) Subject: (do_link): If ln is invoked with --interactive (-i), X-Git-Tag: v5.90~352 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5e741091df258fe2487853b047891e11383896d;p=thirdparty%2Fcoreutils.git (do_link): If ln is invoked with --interactive (-i), encounters an existing destination file, and gets an affirmative response, then first try to unlink the destination file rather than simply failing. Suggestion from Karl Berry. --- diff --git a/src/ln.c b/src/ln.c index 9c370e4965..5efb1d4556 100644 --- a/src/ln.c +++ b/src/ln.c @@ -244,6 +244,7 @@ do_link (const char *source, const char *dest, bool dest_is_dir) fprintf (stderr, _("%s: replace %s? "), program_name, quote (dest)); if (!yesno ()) return true; + remove_existing_files = true; } if (backup_type != no_backups)