1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

(tar-untar-buffer): If the entry has directory link type, extract it

as a directory even if its file name doesn't end with a slash.  Fixes
extraction of NetBSD tar archives.
This commit is contained in:
Magnus Henoch 2008-04-23 16:46:57 +00:00
parent 1b0a6c68e6
commit 419625f7f6
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-04-23 Magnus Henoch <mange@freemail.hu>
* tar-mode.el (tar-untar-buffer): If the entry has directory
link type, extract it as a directory even if its file name doesn't
end with a slash. Fixes extraction of NetBSD tar archives.
2008-04-23 Stefan Monnier <monnier@iro.umontreal.ca>
* server.el (server-start): Also don't get confused by CRs since we

View File

@ -395,7 +395,9 @@ MODE should be an integer which is a file mode value."
(dolist (descriptor tar-parse-info)
(let* ((tokens (tar-desc-tokens descriptor))
(name (tar-header-name tokens))
(dir (file-name-directory name))
(dir (if (eq (tar-header-link-type tokens) 5)
name
(file-name-directory name)))
(start (+ (tar-desc-data-start descriptor)
(- tar-header-offset (point-min))))
(end (+ start (tar-header-size tokens))))