[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
arc-mode fails for some nested archives (patch included)
From: |
Joe Wells |
Subject: |
arc-mode fails for some nested archives (patch included) |
Date: |
Sat, 28 Jan 2006 21:33:17 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Suppose you have a .zip file which contains a member named:
abc/def.jar
Suppose abc/def.jar further contains more files. Then when you try to
visit one of the files inside abc/def.jar using the "f" key (bound to
archive-extract), it will fail and you will get an error message like
this:
Opening output file: no such file or directory,
/tmp/archive.tmp4066KXk/abc/def.jar
The problem lies in the function archive-maybe-copy. It contains code
to try to make sure the necessary temporary directories exist, but the
code is completely messed up and nonsensical.
Here is a patch that fixes the problem:
--- /usr/share/emacs/22.0.50/lisp/arc-mode.el 2005-08-06 23:13:01.000000000
+0100
+++ arc-mode.el 2006-01-28 21:29:42.560000000 +0000
@@ -814,17 +814,11 @@
(archive-name
(or (and archive-subfile-mode (aref archive-subfile-mode 0))
archive)))
- (make-directory archive-tmpdir t)
- ;; If ARCHIVE includes leading directories, make sure they
- ;; exist under archive-tmpdir.
- (let ((arch-dir (file-name-directory archive)))
- (if arch-dir
- (make-directory (concat
- (file-name-as-directory archive-tmpdir)
- arch-dir)
- t)))
(setq archive-local-name
(archive-unique-fname archive-name archive-tmpdir))
+ ;; Make sure all directories in archive-local-name exist
+ ;; under archive-tmpdir.
+ (make-directory (file-name-directory archive-local-name) t)
(save-restriction
(widen)
(write-region start (point-max) archive-local-name nil 'nomessage))
I hope this helps.
--
Joe
P.S. Version information:
I'm using the Gentoo ebuild app-editors/emacs-22.0.50_pre20050225
which is based on a CVS snapshot from 2005-02-25.
In GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.6.8)
of 2005-08-06 on colinux
Distributor `The Cygwin/X Project', version 11.0.60802000
configured using `configure '--prefix=/usr' '--host=i686-pc-linux-gnu'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share'
'--sysconfdir=/etc' '--localstatedir=/var/lib' '--build=i686-pc-linux-gnu'
'--enable-debug' '--program-suffix=.emacs-22.0.50' '--without-carbon'
'--disable-nls' '--with-x' '--with-xpm' '--with-toolkit-scroll-bars'
'--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-x-toolkit=gtk'
'CFLAGS= -march=pentium4 -O2 -pipe' 'build_alias=i686-pc-linux-gnu'
'host_alias=i686-pc-linux-gnu''
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- arc-mode fails for some nested archives (patch included),
Joe Wells <=