Skip to content

Commit 9e2f940

Browse files
committed
test for windows line endings
1 parent 76e3404 commit 9e2f940

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/registry.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ function detect_rdata(io)
99
read(io, UInt8) == UInt8('R') &&
1010
read(io, UInt8) == UInt8('D') &&
1111
read(io, UInt8) in (UInt8('A'), UInt8('B'), UInt8('X')) &&
12-
read(io, UInt8) == UInt8('2')
12+
read(io, UInt8) == UInt8('2') &&
13+
(c = read(io, UInt8); c == UInt8('\n') || (c == UInt8('\r') && read(io, UInt8) == UInt8('\n')))
1314
end
1415

1516
add_format(format"RData", detect_rdata, [".rda", ".RData", ".rdata"], [:RData, LOAD])

0 commit comments

Comments
 (0)