From: Dave Love Date: Wed, 29 Apr 1998 22:34:42 +0000 (+0000) Subject: (tar-mode-write-file): Protect from null tar-header-offset. X-Git-Tag: emacs-20.3~1226 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4063eb1c9cdda753fd4d2a2b10456f5df3cfed6e;p=emacs.git (tar-mode-write-file): Protect from null tar-header-offset. --- diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index c2d2033a641..dd12d9bbca9 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -1205,7 +1205,10 @@ Leaves the region wide." ;; Doing this here confuses things - the region gets left too wide! ;; I suppose this is run in a context where changing the buffer is bad. ;; (tar-pad-to-blocksize) - (write-region tar-header-offset (point-max) buffer-file-name nil t) + ;; tar-header-offset turns out to be null for files fetched with W3, + ;; at least. + (write-region (or tar-header-offset (point-min)) (point-max) + buffer-file-name nil t) (tar-clear-modification-flags) (set-buffer-modified-p nil)) (narrow-to-region 1 tar-header-offset))