Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cl-tar
cl-tar-file
Commits
826c30a1
Commit
826c30a1
authored
Sep 23, 2021
by
Eric Timmons
Browse files
Robustify against streams that error when you call FILE-POSITION
parent
ff5d41cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
826c30a1
# cl-tar-file changelog #
## Unreleased
+
Robustify against streams that error when you call FILE-POSITION.
## v0.1.0 - September 22, 2021
First release!
src/blocked-stream.lisp
View file @
826c30a1
...
...
@@ -91,7 +91,8 @@ of the wrapped stream when instantiated."))
:element-type
element-type
:initial-element
0
)
;; Record the START-FILE-POSITION
(
start-file-position
blocked-stream
)
(
file-position
stream
))))
(
start-file-position
blocked-stream
)
(
ignore-errors
(
file-position
stream
))
(
stream-offset
blocked-stream
)
(
-
(
block-size
blocked-stream
)))))
(
defgeneric
discard-buffer
(
stream
)
(
:documentation
...
...
@@ -144,6 +145,7 @@ the buffer to be written."
(
defmethod
ensure-buffer-valid
((
stream
blocked-stream
))
(
cond
((
not
(
buffer-valid-p
stream
))
(
incf
(
stream-offset
stream
)
(
block-size
stream
))
(
fill-buffer
stream
))
((
=
(
index
stream
)
(
block-size
stream
))
(
discard-buffer
stream
)
...
...
@@ -229,7 +231,7 @@ the buffer to be written."
:do
(
discard-buffer
stream
)
(
setf
(
index
stream
)
(
block-size
stream
))
(
ensure-buffer-valid
))))
(
ensure-buffer-valid
stream
))))
(
cond
((
and
(
=
start-of-chunk-position
(
stream-offset
stream
))
(
or
(
null
(
eof-index
stream
))
...
...
Eric Timmons
@etimmons
mentioned in commit
ecea3d46
·
Sep 23, 2021
mentioned in commit
ecea3d46
mentioned in commit ecea3d46c03b300bf5750c9a11710c5e80785e32
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment