From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Newsgroups: gmane.emacs.bugs Subject: bug#27986: 26.0.50; `rename-file' can rename files without confirmation Date: Sun, 06 Aug 2017 17:40:18 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1502034073 10675 195.159.176.226 (6 Aug 2017 15:41:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 6 Aug 2017 15:41:13 +0000 (UTC) To: 27986@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 06 17:41:10 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 1deNfs-0002Fs-Ke for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Aug 2017 17:41:04 +0200 Original-Received: from localhost ([::1]:33539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deNfy-0005qe-UA for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Aug 2017 11:41:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deNfs-0005qC-F5 for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 11:41:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1deNfr-0001wQ-7l for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 11:41:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42201) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1deNfr-0001vg-2k for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 11:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1deNfq-0000wv-L3 for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 11:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Aug 2017 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27986 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15020340403604 (code B ref -1); Sun, 06 Aug 2017 15:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Aug 2017 15:40:40 +0000 Original-Received: from localhost ([127.0.0.1]:44878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deNfU-0000w4-6q for submit@debbugs.gnu.org; Sun, 06 Aug 2017 11:40:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deNfS-0000vp-CT for submit@debbugs.gnu.org; Sun, 06 Aug 2017 11:40:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1deNfL-0001Qg-RR for submit@debbugs.gnu.org; Sun, 06 Aug 2017 11:40:33 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50342) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1deNfL-0001Qa-Ob for submit@debbugs.gnu.org; Sun, 06 Aug 2017 11:40:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deNfK-0005l7-6W for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 11:40:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1deNfE-0001OD-Em for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 11:40:30 -0400 Original-Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:37712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1deNfE-0001NY-7b for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 11:40:24 -0400 Original-Received: by mail-wm0-x230.google.com with SMTP id t201so51779918wmt.0 for ; Sun, 06 Aug 2017 08:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=w8pnJj3ZpX3M0bRLtKxGtrdBMCtb60cYNn5fTLJgGRU=; b=qa+EK7c6COtR+zAUMM0ilTuiRqWfDyPwvuZkCK+ADruJWKHxg/unQXajEDof7I9YK8 DzcbZSLNu7lhBqYuV423PYQ9zGqU8n6XoLEW9ffrOIc1pxE+DGaUNUj7TovqyIRkY2Cq EmlALtAVrGxtbA0MLq340waC8hPPuJ25ueTC98aQELwBVQi4wcyYrzmaMqpn+APi/21/ zHB2bTGXnp0ijHg2YQW5RoRRzAiIgo8ihV28Wk72w6nrFnPfVHK0S/J6Q7rqvvjAoKh/ i1MlxMdyExq0lWXIAWJHnV4SrwPVfrdfhvzMfmm8hI36300K1MAELUc3dRFe0BgV9Usk EZaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=w8pnJj3ZpX3M0bRLtKxGtrdBMCtb60cYNn5fTLJgGRU=; b=X8MB0b8APhDZdgIn1wL6fFlk88A/WiAN7YBKxUFgGQr58PN/jjmWQiHLeiqkEE1XoF hhJP6KjmZMsD/M+FV8ZgBYoXsJOtyOPnXE8JNX94paiaMT0GgQToN8bi08KlGEgC7KXE FnOSFDixjqts4vQWGpmQ1qBPNayZ0IF57dKQ2TbYi+1UVcHXRfpiiU54b0HmoKkF0EZC K/AcuywF9UCkeDkuI+ibCnzeizHl8AfIDVUuO2ILQFF/HzmMZoKItXRsTGMLB8+LfIFl FhdzBGP4sg/02dnWMQXaUfKM3DoZKAO38TujfCRGb1qNXMwS0Cb56rWZev4IQflxZyJL Fq6Q== X-Gm-Message-State: AHYfb5jLiFAC5iAg4QFdXIdwkVEQiw8iYwXPtOl7K5UW/LJjxQcwiuX5 7UH8W1bJ+tTZbOW7x5E= X-Received: by 10.28.230.18 with SMTP id d18mr1636252wmh.56.1502034021209; Sun, 06 Aug 2017 08:40:21 -0700 (PDT) Original-Received: from p ([2001:4c50:256:ae00:21eb:966:f36b:fdde]) by smtp.gmail.com with ESMTPSA id d20sm7500967wrc.96.2017.08.06.08.40.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 06 Aug 2017 08:40:20 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:135497 Archived-At: Run the following in *scratch*: (make-directory "/tmp/emacs") nil (write-region "" nil "/tmp/emacs/=C3=9F") nil (write-region "" nil "/tmp/emacs/=E1=BA=9E") nil (directory-files "/tmp/emacs") ("." ".." "=C3=9F" "=E1=BA=9E") (rename-file "/tmp/emacs/=E1=BA=9E" "/tmp/emacs/=C3=9F") nil Note how `rename-file' has silently overwritten `=C3=9F'. This is because = on macOS, `=C3=9F' and `=E1=BA=9E' are different file names, but Emacs treats = them as equal. Probably the test for case-insensitive file names should be removed altogether (it can't work correctly and introduces a filesystem race), and `rename-file' should use link(2) + unlink(2) if renameat2 isn't available. In GNU Emacs 26.0.50 (build 77, x86_64-apple-darwin16.7.0, NS appkit-1504.8= 3 Version 10.12.6 (Build 16G29)) of 2017-08-06 built on p Repository revision: b1b99edd3ee587a5154106d4d16547eac4916c55 Windowing system distributor 'Apple', version 10.3.1504 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --with-modules --without-xml2 --without-pop --with-mailutils --enable-gcc-warnings=3Dyes MAKEINFO=3D/usr/local/opt/texinfo/bin/makeinfo 'CFLAGS=3D-O3 -g0' LDFLAGS=3D-O3' Configured features: DBUS NOTIFY ACL GNUTLS ZLIB TOOLKIT_SCROLL_BARS NS MODULES Important settings: value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 204143 9065) (symbols 48 20146 1) (miscs 40 43 181) (strings 32 29176 1731) (string-bytes 1 784929) (vectors 16 35010) (vector-slots 8 710995 9656) (floats 8 48 68) (intervals 56 205 0) (buffers 992 11))