mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 11:24:14 +08:00
(XP3): fixed encrypted files packing.
This commit is contained in:
parent
e98910ac0c
commit
693cecd71a
@ -533,7 +533,7 @@ NextEntry:
|
||||
Name = name,
|
||||
Cipher = scheme,
|
||||
IsEncrypted = use_encryption
|
||||
&& !(scheme.StartupTjsNotEncrypted && name.EndsWith ("startup.tjs"))
|
||||
&& !(scheme.StartupTjsNotEncrypted && VFS.IsPathEqualsToFileName (name, "startup.tjs"))
|
||||
};
|
||||
bool compress = compress_contents && ShouldCompressFile (entry);
|
||||
using (var file = File.Open (name, FileMode.Open, FileAccess.Read))
|
||||
@ -674,7 +674,6 @@ NextEntry:
|
||||
Size = unpacked_size,
|
||||
PackedSize = unpacked_size,
|
||||
};
|
||||
xp3entry.Segments.Add (segment);
|
||||
if (compress)
|
||||
{
|
||||
output = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9, true);
|
||||
@ -715,6 +714,7 @@ NextEntry:
|
||||
segment.PackedSize = (uint)(dest.Position - segment.Offset);
|
||||
xp3entry.Size = segment.PackedSize;
|
||||
}
|
||||
xp3entry.Segments.Add (segment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user