read a consistent amount from pointer file
A few places were reading the max symlink size of a pointer file, then passing tp parseLinkTargetOrPointer. Which is fine currently, but to support pointer files with lines of data after the pointer, enough has to be read that parseLinkTargetOrPointer can be assured of seeing enough of that data to know if it's correctly formatted. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
4cd9325c2c
commit
5b373a9dd2
5 changed files with 12 additions and 12 deletions
|
@ -162,7 +162,7 @@ catKey' ref sz
|
|||
-- Avoid catting large files, that cannot be symlinks or
|
||||
-- pointer files, which would require buffering their
|
||||
-- content in memory, as well as a lot of IO.
|
||||
| sz <= maxPointerSz =
|
||||
| sz <= fromIntegral maxPointerSz =
|
||||
parseLinkTargetOrPointer . L.toStrict <$> catObject ref
|
||||
catKey' _ _ = return Nothing
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue