From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: bug#27986: 26.0.50; 'rename-file' can rename files without Date: Sat, 19 Aug 2017 17:33:56 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: blaine.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: blaine.gmane.org 1503178515 1722 195.159.176.226 (19 Aug 2017 21:35:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Aug 2017 21:35:15 +0000 (UTC) To: 27986@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 19 23:35:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djBOZ-0008GA-3q for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Aug 2017 23:35:03 +0200 Original-Received: from localhost ([::1]:37690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djBOf-0005h1-Kd for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Aug 2017 17:35:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djBOY-0005gO-PJ for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 17:35:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djBOX-0001nd-Rz for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 17:35:02 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37212) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1djBOX-0001nF-OZ for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 17:35:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1djBOX-0004MR-I7 for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 17:35:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Aug 2017 21:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27986 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: security Original-Received: via spool by 27986-submit@debbugs.gnu.org id=B27986.150317844916701 (code B ref 27986); Sat, 19 Aug 2017 21:35:01 +0000 Original-Received: (at 27986) by debbugs.gnu.org; 19 Aug 2017 21:34:09 +0000 Original-Received: from localhost ([127.0.0.1]:45893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djBNh-0004LI-40 for submit@debbugs.gnu.org; Sat, 19 Aug 2017 17:34:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djBNf-0004L6-4z for 27986@debbugs.gnu.org; Sat, 19 Aug 2017 17:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djBNZ-0006tg-6Y for 27986@debbugs.gnu.org; Sat, 19 Aug 2017 17:34:02 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djBNZ-0006tE-2U for 27986@debbugs.gnu.org; Sat, 19 Aug 2017 17:34:01 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1djBNU-0000rW-80; Sat, 19 Aug 2017 17:33:56 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135923 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] I haven't followed the discussion, but I'm told there is a proposal to make this change: > Btw, in case it isn't clear: the issue at hand is an incompatible > change to rename-file (and probably also other functions, like > copy-file). Where previously (rename-file A B) with B a directory > will move A into B/A, under the proposed change it will only do so if > B actually ended in a slash; otherwise it will move A to B, deleting B > if it exists. The incompatibility will manifest itself if some old > code expects to get B/A, but instead gets either an error (if B is a > non-empty directory) or B silently removed (if it is empty). Assuming this applies only when directory B is empty, so that this won't delete non-empty directories, then I don't have any objection. I would object to deleting non-empty directories here. Another option that might be good is to make this operation always signal an error in the case where B is a directory and does not end with a slash. I don't have an opinion about which of those two is better. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html.