From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 21 11:40:07 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 328DFC32 for ; Mon, 21 Jul 2014 11:40:07 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19A582988 for ; Mon, 21 Jul 2014 11:40:07 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LBe6XM067293 for ; Mon, 21 Jul 2014 11:40:06 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 191974] ln(1): |ln -sF| never calls rmdir(2) on target_file == target_dir, only target_dir/basename Date: Mon, 21 Jul 2014 11:40:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jbeich@vfemail.net X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 11:40:07 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191974 --- Comment #4 from Jan Beich --- Created attachment 144837 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144837&action=edit improve manpage -f flag can replace a file with either symlink to file or directory and hardlink to file. -f already errors out if source_file is a directory and -F inherits that. But comment 3 still doesn't explain *why* -F is artifically limited to symlinks and only directories or behavior inconsistency if target_file is a directory. hadlink case $ echo >foo $ echo >bar $ ln -F foo bar vs. $ echo >foo $ mkdir bar $ ln -F foo bar symlink case $ echo >foo $ echo >bar $ ln -sF foo bar $ mkdir foo $ echo >bar $ ln -sF foo bar vs. $ mkdir foo $ mkdir bar $ ln -sF foo bar $ echo >foo $ mkdir bar $ ln -sF foo bar Let's remove some ambiguity in manpage such as when target file is a directory. Given current behavior its notion doesn't change from target directory and rmdir(2) is only called under it but not on the directory itself. Also, -F is not only an extension but incompatible with GNU ln. -- You are receiving this mail because: You are the assignee for the bug.