]> git.eshelyaron.com Git - emacs.git/commitdiff
(tar-extract): Call generate-new-buffer-name to
authorEli Zaretskii <eliz@gnu.org>
Fri, 15 Jun 2001 09:42:36 +0000 (09:42 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 15 Jun 2001 09:42:36 +0000 (09:42 +0000)
create a buffer for extracted file, in case there's more than one
file by that name in an archive, possibly in different
directories.  From Kevin Rodgers <kevinr@ihs.com>.

lisp/tar-mode.el

index fac148b2b63e736cae9d02e06391e76d8b9337f4..399e2b2f066b7cddc46113ac0e4928f86ce40c5f 100644 (file)
@@ -679,10 +679,11 @@ appear on disk when you save the tar-file's buffer."
     (let* ((tar-buffer (current-buffer))
           (tar-buffer-multibyte enable-multibyte-characters)
           (tarname (buffer-name))
-          (bufname (concat (file-name-nondirectory name)
-                           " ("
-                           tarname
-                           ")"))
+          (bufname (generate-new-buffer-name
+                    (concat (file-name-nondirectory name)
+                            " ("
+                            tarname
+                            ")")))
           (read-only-p (or buffer-read-only view-p))
           (buffer (get-buffer bufname))
           (just-created nil)