|
|
@ -274,9 +274,11 @@ public class CacheImporter @Inject constructor( |
|
|
|
stmt.executeBatch() |
|
|
|
stmt.executeBatch() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// we deliberately ignore groups with truncated versions here and |
|
|
|
/* |
|
|
|
// re-download them, just in case there's a (crc32, truncated version) |
|
|
|
* We deliberately ignore groups with truncated versions here and |
|
|
|
// collision |
|
|
|
* re-download them, just in case there's a (crc32, truncated version) |
|
|
|
|
|
|
|
* collision. |
|
|
|
|
|
|
|
*/ |
|
|
|
connection.prepareStatement( |
|
|
|
connection.prepareStatement( |
|
|
|
""" |
|
|
|
""" |
|
|
|
SELECT t.group_id |
|
|
|
SELECT t.group_id |
|
|
@ -475,8 +477,10 @@ public class CacheImporter @Inject constructor( |
|
|
|
var versionTruncated = true |
|
|
|
var versionTruncated = true |
|
|
|
val encrypted = Js5Compression.isEncrypted(buf.slice()) |
|
|
|
val encrypted = Js5Compression.isEncrypted(buf.slice()) |
|
|
|
|
|
|
|
|
|
|
|
// grab the non-truncated version from the Js5Index if we can |
|
|
|
/* |
|
|
|
// confirm the group on disk matches the group in the index |
|
|
|
* Grab the non-truncated version from the Js5Index if we can |
|
|
|
|
|
|
|
* confirm the group on disk matches the group in the index. |
|
|
|
|
|
|
|
*/ |
|
|
|
if (index != null) { |
|
|
|
if (index != null) { |
|
|
|
val entry = index[group] |
|
|
|
val entry = index[group] |
|
|
|
if (entry != null && entry.checksum == buf.crc32() && (entry.version and 0xFFFF) == version) { |
|
|
|
if (entry != null && entry.checksum == buf.crc32() && (entry.version and 0xFFFF) == version) { |
|
|
|