Skip to content

Commit 0da6681

Browse files
committed
Ignore EOFError's as well as MagicMismatchErrors
This fixes the rather embarrassing issue of throwing on attempting to `readmeta()` an empty file
1 parent bad1c27 commit 0da6681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Abstract/ObjectHandle.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function readmeta(io::IO)
124124
try
125125
return readmeta(io, T)
126126
catch e
127-
if !isa(e,MagicMismatch)
127+
if !isa(e,MagicMismatch) && !isa(e,EOFError)
128128
rethrow(e)
129129
end
130130
end

0 commit comments

Comments
 (0)