diff options
| author | Dave Love | 1998-04-29 22:34:42 +0000 |
|---|---|---|
| committer | Dave Love | 1998-04-29 22:34:42 +0000 |
| commit | 4063eb1c9cdda753fd4d2a2b10456f5df3cfed6e (patch) | |
| tree | ccfddc5695ab78290814c8790a68e2135f70e821 | |
| parent | 9516059404050d7ba391c5415d2684327ee55276 (diff) | |
| download | emacs-4063eb1c9cdda753fd4d2a2b10456f5df3cfed6e.tar.gz emacs-4063eb1c9cdda753fd4d2a2b10456f5df3cfed6e.zip | |
(tar-mode-write-file): Protect from null tar-header-offset.
| -rw-r--r-- | lisp/tar-mode.el | 5 |
1 files changed, 4 insertions, 1 deletions
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." | |||
| 1205 | ;; Doing this here confuses things - the region gets left too wide! | 1205 | ;; Doing this here confuses things - the region gets left too wide! |
| 1206 | ;; I suppose this is run in a context where changing the buffer is bad. | 1206 | ;; I suppose this is run in a context where changing the buffer is bad. |
| 1207 | ;; (tar-pad-to-blocksize) | 1207 | ;; (tar-pad-to-blocksize) |
| 1208 | (write-region tar-header-offset (point-max) buffer-file-name nil t) | 1208 | ;; tar-header-offset turns out to be null for files fetched with W3, |
| 1209 | ;; at least. | ||
| 1210 | (write-region (or tar-header-offset (point-min)) (point-max) | ||
| 1211 | buffer-file-name nil t) | ||
| 1209 | (tar-clear-modification-flags) | 1212 | (tar-clear-modification-flags) |
| 1210 | (set-buffer-modified-p nil)) | 1213 | (set-buffer-modified-p nil)) |
| 1211 | (narrow-to-region 1 tar-header-offset)) | 1214 | (narrow-to-region 1 tar-header-offset)) |