Skip to content

Commit 7be656f

Browse files
committed
make sure query doesn't change position of stream
1 parent 33c28f4 commit 7be656f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/query.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,13 @@ function query(io::IO, filename::Nullable{UTF8String}=Nullable{UTF8String}())
390390
length(m) == 0 && continue
391391
while length(m) > length(magic)
392392
if eof(io)
393+
seek(io, pos)
393394
return Stream{unknown_df,typeof(io)}(io, filename)
394395
end
395396
push!(magic, read(io, UInt8))
396397
end
397398
if iter_eq(magic, m)
399+
seek(io, pos)
398400
return Stream{DataFormat{last(p)},typeof(io)}(io, filename)
399401
end
400402
end

0 commit comments

Comments
 (0)