From 6da7ea569dbb4639d8eca9a6a8e0d099c4c2ddcb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 15 Jun 2001 09:42:36 +0000 Subject: [PATCH] (tar-extract): Call generate-new-buffer-name to 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 . --- lisp/tar-mode.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index fac148b2b63..399e2b2f066 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -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)