From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam =?UTF-8?Q?Sj=C3=B8gren?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61326: Adding --no-add-suffix to zip patch Date: Tue, 07 Feb 2023 20:59:33 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87ilgdjlga.fsf@tullinup.koldfront.dk> References: <87ilgeoc4w.fsf@tullinup.koldfront.dk> <8574C128-9560-490A-88E6-49E415BBDB24@netyu.xyz> Reply-To: Adam =?UTF-8?Q?Sj=C3=B8gren?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27619"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 61326@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 07 21:00:30 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPU8j-00070M-Q7 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Feb 2023 21:00:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPU8K-0002JX-CG; Tue, 07 Feb 2023 15:00:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPU8I-0002Ir-Gu for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 15:00:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPU8I-0004qy-51 for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 15:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPU8I-0006s5-0J for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2023 15:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Adam =?UTF-8?Q?Sj=C3=B8gren?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2023 20:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61326 X-GNU-PR-Package: emacs Original-Received: via spool by 61326-submit@debbugs.gnu.org id=B61326.167579998026349 (code B ref 61326); Tue, 07 Feb 2023 20:00:01 +0000 Original-Received: (at 61326) by debbugs.gnu.org; 7 Feb 2023 19:59:40 +0000 Original-Received: from localhost ([127.0.0.1]:54126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPU7w-0006qv-8C for submit@debbugs.gnu.org; Tue, 07 Feb 2023 14:59:40 -0500 Original-Received: from virgil.koldfront.dk ([212.237.178.116]:44422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPU7t-0006qj-W7 for 61326@debbugs.gnu.org; Tue, 07 Feb 2023 14:59:38 -0500 Original-Received: from tullinup.koldfront.dk (tullinup.koldfront.dk [192.168.1.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by virgil.koldfront.dk (Postfix) with ESMTPS id C6FBE16BCC903 for <61326@debbugs.gnu.org>; Tue, 7 Feb 2023 20:59:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 virgil.koldfront.dk C6FBE16BCC903 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=koldfront.dk; s=mail; t=1675799973; bh=mHNwEmqr11b+iw3T+auHLjeKS7rtgk/n8it76ckLYc4=; h=From:To:Subject:In-Reply-To:References:Date:From; b=j/9/x/RYxgTckOh2T47Gu0C+KWrWlllF9C1wfyEzPnnwDoGN84sisBJJtGbCRl3jy pRfiwvPofEzHLYZdhh67fyQ03/F+aVb6BNMz6vqJoB2SBCrmvXSOO3VQIzVzQCyIKH 50nJaABM6XjignRgDYgqIxUdaGLYCoBZSX9xdPOYEhwCwtxGm9sErjPToBfaSzH0pf N7yaPA0NXIYQgCgdHRwSbCuwuZNoejRBIYMRAMu3yfz61NWfJQyRMz44JFcmFpWTgq sQUNKbzjY7DXVmVmBZhrSaSsZhEROR82VT6fYQCUN4SGMo1NyKraLwltHQJy4BjxIv iZUIqV18TyAfw== Original-Received: by tullinup.koldfront.dk (Postfix, from userid 1000) id B176420196C92; Tue, 7 Feb 2023 20:59:33 +0100 (CET) In-Reply-To: <8574C128-9560-490A-88E6-49E415BBDB24@netyu.xyz> (Ruijie Yu's message of "Tue, 7 Feb 2023 09:31:11 +0800") OpenPGP: id=476630590A231909B0A0961A49D0746121BDE416; url=https://asjo.koldfront.dk/gpg.asc X-Now-Playing: The Real Snow White, 4:13 Dream (The Cure) X-Hashcash: 1:25:230207:ruijie@netyu.xyz::j0quCQBs7pLHCCx+:0nbxX X-Hashcash: 1:25:230207:61326@debbugs.gnu.org::MHyT4/JDBk/xavg2:0Hgqf X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255079 Archived-At: Ruijie writes: > Maybe, at least in the meantime, we change it such that all write > operations for zip create files in temp, and move to / overwrite the > original file when done? Although I don=E2=80=99t have a full understandi= ng on > how that would be done and whether there are problems along with it. That sounds like a good solution, for archives with no '.' in the filename. I guess the main problem is if the archive is huge, updating an existing archive might (?) be more efficient than creating an entirely new one. Another way to go about it could be to temporarily rename the archive to have a name with a '.' in it, make the change, and then rename it back; conceptually: mv a a.zip # update a.zip rather than a mv a.zip a That has its own set of possible problems. Maybe you could make a link to the original archive, where the link has a '.' in the name, have zip update the file via the link and then remove the link again; conceptually: ln a a.zip # update a.zip rather than a rm a.zip I think I like this the most, but again...