Skip to content

Commit

Permalink
Merge pull request #1077 from Santarh/zipFix
Browse files Browse the repository at this point in the history
Fix bug of unarchiving stored file in zip.
  • Loading branch information
ousttrue authored Jun 28, 2021
2 parents 7b3303b + 90aa30a commit 7d7fda1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Assets/UniGLTF/Runtime/UniGLTF/IO/ZipArchiveStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ public ArraySegment<byte> Get(string url)
return new ArraySegment<byte>(Extract(found));

case CompressionMethod.Stored:
return new ArraySegment<byte>(found.Bytes, found.RelativeOffsetOfLocalFileHeader, found.CompressedSize);
var local = new LocalFileHeader(found.Bytes, found.RelativeOffsetOfLocalFileHeader);
var pos = local.Offset + local.Length;
return new ArraySegment<byte>(local.Bytes, pos, local.CompressedSize);
}

throw new NotImplementedException(found.CompressionMethod.ToString());
Expand Down

0 comments on commit 7d7fda1

Please sign in to comment.