From unknown Mon Aug 18 11:32:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55123: 29.0.50; archive-copy-file overwrites zip file in same dir Resent-From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Apr 2022 10:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55123 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 55123@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.16509693901122 (code B ref -1); Tue, 26 Apr 2022 10:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Apr 2022 10:36:30 +0000 Received: from localhost ([127.0.0.1]:37160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njIYX-0000I1-Sv for submit@debbugs.gnu.org; Tue, 26 Apr 2022 06:36:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:40838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njIYW-0000Hu-O3 for submit@debbugs.gnu.org; Tue, 26 Apr 2022 06:36:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njIYO-00019S-H8 for bug-gnu-emacs@gnu.org; Tue, 26 Apr 2022 06:36:23 -0400 Received: from mail2.itgrp.ru ([87.251.91.230]:37460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njIYL-0008FI-SZ for bug-gnu-emacs@gnu.org; Tue, 26 Apr 2022 06:36:20 -0400 IronPort-SDR: fn2Gc7USkCDRpFH2dUXjB2FPfsZI2b/XEaDscOPB7xVWFMGyUsAMNokq8pfT3ehMzTxg4SD8Jj BIcfZvf7Zy/w== X-IronPort-AV: E=Sophos;i="5.90,182,1643662800"; d="scan'208";a="155548475" From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Thread-Topic: 29.0.50; archive-copy-file overwrites zip file in same dir Thread-Index: AQHYWVlBKjq+IvhEjEu2w88mcoH6Pw== Date: Tue, 26 Apr 2022 10:36:03 +0000 Message-ID: <084ede8555b34c85b1df580a991f17d2@pay-lab.ru> Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.24.4.20] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received-SPF: pass client-ip=87.251.91.230; envelope-from=prvs=1087b8a61=an.petrov@pay-lab.ru; helo=mail2.itgrp.ru X-Spam_score_int: 13 X-Spam_score: 1.3 X-Spam_bar: + X-Spam_report: (1.3 / 5.0 requ) BAYES_00=-1.9, CHARSET_FARAWAY_HEADER=3.2, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello, team! Try the following test: 1. start `emacs -Q` 2. create a file 2.txt with any content and save it. Consifer we are in ~/1/ directory. 3. zip the file: M-! zip 1.zip 2.txt [RET] 4. open resulting zip archive with dired 6. find 2.txt inside and archive-copy-file it into the same directory (the prompt is "Copy 2.txt to: ~/1/"): C [RET] now Emacs tries to overwrite the 1.zip archive instead of creating 2.txt file in the same directory.=20 If you specify file name or other directory (either with file name or not) the file will be saved under name "2.txt". But when you specify the same directory without file name the zip archive will be overwritten regardless of correct prompt message. Best regards, Andrey Petrov. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, c= airo version 1.17.4) of 2022-02-27 built on pva-msi Repository revision: 2fdc7d504477198334c7de75c46585d1bcf19c40 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: Arch Linux Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: ru_RU.UTF-8 locale-coding-system: utf-8-unix Major mode: Zip-Archive Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-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 buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr shortdoc help-fns radix-tree help-mode emacsbug message mailcap yank-media rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search seq gv byte-opt bytecomp byte-compile cconv 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 subr-x cl-loaddefs cl-lib arc-mode archive-mode shell pcomplete comint ansi-color ring cyril-util iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 57004 10758) (symbols 48 6663 1) (strings 32 19515 1844) (string-bytes 1 613128) (vectors 16 12862) (vector-slots 8 176800 17627) (floats 8 64 23) (intervals 56 276 0) (buffers 992 14)) From unknown Mon Aug 18 11:32:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55123: 29.0.50; archive-copy-file overwrites zip file in same dir Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Apr 2022 11:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55123 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Cc: 55123@debbugs.gnu.org Received: via spool by 55123-submit@debbugs.gnu.org id=B55123.165097248022258 (code B ref 55123); Tue, 26 Apr 2022 11:28:03 +0000 Received: (at 55123) by debbugs.gnu.org; 26 Apr 2022 11:28:00 +0000 Received: from localhost ([127.0.0.1]:37249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njJMN-0005mo-7f for submit@debbugs.gnu.org; Tue, 26 Apr 2022 07:28:00 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njJML-0005lU-AT for 55123@debbugs.gnu.org; Tue, 26 Apr 2022 07:27:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=PsiTJdrZaMxtawf8Dhx5j8dqaNgvs9+n8/BXSJxp0NQ=; b=IhE+qOIP/cg9S6384Z4mEGpg0P QZUMGqEsbn56ai5yIu+G09HvQWrM7zOkhRiiFaXQ6tfjbp1RDn346Odh9e9TmlFHekmi4nynSN7kR YHK+ScANEbmsJjLznOMBZrRZXGe5DKWDJwc4qInmDgkk6AsNzYSNrMnBkWN5v3Dy0T6g=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njJMB-0007yj-Ig; Tue, 26 Apr 2022 13:27:50 +0200 From: Lars Ingebrigtsen References: <084ede8555b34c85b1df580a991f17d2@pay-lab.ru> X-Now-Playing: William Basinski's _Lamentations_: "For Whom the Bell Tolls" Date: Tue, 26 Apr 2022 13:27:47 +0200 In-Reply-To: <084ede8555b34c85b1df580a991f17d2@pay-lab.ru> ("=?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?="'s message of "Tue, 26 Apr 2022 10:36:03 +0000") Message-ID: <878rrshyoc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= writes: > 6. find 2.txt inside and archive-copy-file it into the same directory > (the prompt is "Copy 2.txt to: ~/1/"): > C [RET] > now Emacs tries to overwrite the 1.zip archive instead of creating > 2.txt [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) =D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2 =D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9 <= an.petrov@pay-lab.ru> writes: > 6. find 2.txt inside and archive-copy-file it into the same directory > (the prompt is "Copy 2.txt to: ~/1/"): > C [RET] > now Emacs tries to overwrite the 1.zip archive instead of creating > 2.txt file in the same directory.=20 Yup. I've now fixed this in Emacs 29. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 26 07:28:06 2022 Received: (at control) by debbugs.gnu.org; 26 Apr 2022 11:28:06 +0000 Received: from localhost ([127.0.0.1]:37253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njJMU-0005oB-3n for submit@debbugs.gnu.org; Tue, 26 Apr 2022 07:28:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njJMP-0005lq-Gx for control@debbugs.gnu.org; Tue, 26 Apr 2022 07:28:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gmlEfISThiz/sUvKpaZH8+/U8dyXvElnrNwwu/J2ih8=; b=AArpkSf/5WQv8zL2aVcOOOP4Wu MuK3gjLcyhq0xqDUzCmTJSgMwMix77Xn0lmGT7qMiy4w9HHxs9K1gL9KshEZy5qiPVgWItVgEehab FBVMJNyFn16pjYAK6/9xRB8bv5yr9kCb83R0CNzLg5NjeqklqzEXqjzE8DQUB/RaMJGI=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njJMH-0007yx-MM for control@debbugs.gnu.org; Tue, 26 Apr 2022 13:27:55 +0200 Date: Tue, 26 Apr 2022 13:27:53 +0200 Message-Id: <877d7chyo6.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #55123 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 55123 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 55123 29.1 quit