# HG changeset patch # User Dave Love # Date 893889282 0 # Node ID facde3a9a8467d905dd212a6fd70330302cd8453 # Parent 96fc2ea4248557c1589fe6bf863d19318f114bea (tar-mode-write-file): Protect from null tar-header-offset. diff -r 96fc2ea42485 -r facde3a9a846 lisp/tar-mode.el --- a/lisp/tar-mode.el Wed Apr 29 22:15:59 1998 +0000 +++ b/lisp/tar-mode.el Wed Apr 29 22:34:42 1998 +0000 @@ -1205,7 +1205,10 @@ ;; 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))