Skip to content

Commit 8024bd6

Browse files
maj0efhs
authored andcommitted
Fix tabs instead of whitespaces
1 parent 5cb12c9 commit 8024bd6

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

src/ZipFile.jl

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ mutable struct ReadableFile <: IO
7777
_pos :: Int64 # current position in uncompressed data
7878
_zpos :: Int64 # current position in compressed data
7979

80-
function ReadableFile(io::IO, name::AbstractString, method::UInt16, dostime::UInt16,
81-
dosdate::UInt16, crc32::UInt32, compressedsize::Unsigned,
82-
uncompressedsize::Unsigned, _offset::Unsigned)
83-
if method != Store && method != Deflate
84-
error("unknown compression method $method")
85-
end
86-
new(io, name, method, dostime, dosdate, crc32,
87-
compressedsize, uncompressedsize, _offset, -1, io, 0, 0, 0)
88-
end
80+
function ReadableFile(io::IO, name::AbstractString, method::UInt16, dostime::UInt16,
81+
dosdate::UInt16, crc32::UInt32, compressedsize::Unsigned,
82+
uncompressedsize::Unsigned, _offset::Unsigned)
83+
if method != Store && method != Deflate
84+
error("unknown compression method $method")
85+
end
86+
new(io, name, method, dostime, dosdate, crc32,
87+
compressedsize, uncompressedsize, _offset, -1, io, 0, 0, 0)
88+
end
8989
end
9090

9191
"""
@@ -313,22 +313,22 @@ function _find_zip64_diroffset(io::IO, enddiroffset::Integer)
313313
offset, nfiles
314314
end
315315
function _find_diroffset(io::IO, enddiroffset::Integer)
316-
seek(io, enddiroffset)
317-
if readle(io, UInt32) != _EndCentralDirSig
318-
error("internal error")
319-
end
320-
skip(io, 2+2+2)
321-
nfiles = read(io, UInt16)
322-
skip(io, 4)
323-
offset = readle(io, UInt32)
324-
commentlen = readle(io, UInt16)
316+
seek(io, enddiroffset)
317+
if readle(io, UInt32) != _EndCentralDirSig
318+
error("internal error")
319+
end
320+
skip(io, 2+2+2)
321+
nfiles = read(io, UInt16)
322+
skip(io, 4)
323+
offset = readle(io, UInt32)
324+
commentlen = readle(io, UInt16)
325325
comment = utf8_validate(read!(io, Array{UInt8}(undef, commentlen)))
326-
if nfiles == 0xFFFF || offset == 0xFFFFFFFF
327-
dirloc = _find_zip64_enddirlocoffset(io)
328-
z64enddiroffset = _find_zip64_enddiroffset(io::IO, dirloc)
329-
offset, nfiles = _find_zip64_diroffset(io, z64enddiroffset)
330-
end
331-
offset, nfiles, comment
326+
if nfiles == 0xFFFF || offset == 0xFFFFFFFF
327+
dirloc = _find_zip64_enddirlocoffset(io)
328+
z64enddiroffset = _find_zip64_enddiroffset(io::IO, dirloc)
329+
offset, nfiles = _find_zip64_diroffset(io, z64enddiroffset)
330+
end
331+
offset, nfiles, comment
332332
end
333333

334334

@@ -603,7 +603,6 @@ function addfile(w::Writer, name::AbstractString; method::Integer=Store, mtime::
603603
w._current = nothing
604604
end
605605

606-
607606
if mtime < 0
608607
mtime = time()
609608
end

0 commit comments

Comments
 (0)