changeset 25575:d8c646ec07fa

(tar-extract): Don't assume buffer is visiting a file.
author Richard M. Stallman <rms@gnu.org>
date Mon, 06 Sep 1999 22:03:38 +0000
parents e99b1ef55f92
children 913fac3ab440
files lisp/tar-mode.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/tar-mode.el	Mon Sep 06 21:52:01 1999 +0000
+++ b/lisp/tar-mode.el	Mon Sep 06 22:03:38 1999 +0000
@@ -753,7 +753,9 @@
 	 (end (+ start size)))
     (let* ((tar-buffer (current-buffer))
 	   (tar-buffer-multibyte enable-multibyte-characters)
-	   (tarname (file-name-nondirectory (buffer-file-name)))
+	   (tarname (if (buffer-file-name)
+			(file-name-nondirectory (buffer-file-name))
+		      (buffer-name)))
 	   (bufname (concat (file-name-nondirectory name)
 			    " ("
 			    tarname