]> git.eshelyaron.com Git - emacs.git/commit
Handle modifications in extensionless zip files (bug#61326)
authorRuijie Yu <ruijie+git@netyu.xyz>
Mon, 6 Mar 2023 03:03:32 +0000 (11:03 +0800)
committerEli Zaretskii <eliz@gnu.org>
Thu, 20 Apr 2023 09:26:05 +0000 (12:26 +0300)
commitfd4c9246fc8daea4965b868e80e0f2d9d544dc22
tree1ae2a962dad71de1ed46e283fa9b19b21aa5c722
parente0c8e4f12fb18695f309b1fd5ff26513ac5611e5
Handle modifications in extensionless zip files (bug#61326)

* lisp/arc-mode.el (archive-*-write-file-member)
(archive-*-expunge): Refactor to correctly modify
extensionless zip archives.
(archive-expunge): Move implementation to a separate helper
function to facilitate testing.
(archive--act-files): New helper function to wrap around
`call-process' calls.
(archive--need-rename-p): New helper function to check whether
a temporary rename is necessary.
(archive--ensure-extension) (archive--maybe-rename): New helper
functions to rename archive if the caller deems it necessary.
(archive--with-ensure-extension): New helper function to handle
writing an archive while ensuring extensionless archives work
correctly by temporarily renaming them.

* test/lisp/arc-mode-tests.el (arc-mode-test-zip-ensure-ext):
New regression test for bug#61326.
lisp/arc-mode.el
test/lisp/arc-mode-tests.el