summaryrefslogtreecommitdiff
path: root/lisp/tar-mode.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-09-27 08:11:36 +0000
committerGerd Moellmann <gerd@gnu.org>2001-09-27 08:11:36 +0000
commite63f0ff0f6b4db0c5ac7ed09f06dba5e64258aa7 (patch)
treeba309fe7d2345fe22b6aba97ac40b6bb7ea88e8e /lisp/tar-mode.el
parent974548ec2c9217aba601ba91257366e934925932 (diff)
downloademacs-e63f0ff0f6b4db0c5ac7ed09f06dba5e64258aa7.tar.gz
(tar-mode-write-file): Don't signal an error by
calling byte-to-position with a nil tar-header-offset.
Diffstat (limited to 'lisp/tar-mode.el')
-rw-r--r--lisp/tar-mode.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 2e1b8c5d5de..4c89f9b4caf 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -1245,8 +1245,9 @@ Leaves the region wide."
;; tar-header-offset turns out to be null for files fetched with W3,
;; at least.
(let ((coding-system-for-write 'no-conversion))
- (write-region (or (byte-to-position tar-header-offset)
- (point-min))
+ (write-region (if tar-header-offset
+ (byte-to-position tar-header-offset)
+ (point-min))
(point-max)
buffer-file-name nil t))
(tar-clear-modification-flags)