mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 00:38:46 +00:00
Parse release number properly, use Preconditions in IndexedFileSystem.
This commit is contained in:
@@ -167,7 +167,7 @@ public final class Server {
|
|||||||
serviceManager.startAll();
|
serviceManager.startAll();
|
||||||
|
|
||||||
int releaseNo = context.getRelease().getReleaseNumber();
|
int releaseNo = context.getRelease().getReleaseNumber();
|
||||||
IndexedFileSystem fs = new IndexedFileSystem(Paths.get("data/fs/", Integer.toString(releaseNo)), true);
|
IndexedFileSystem fs = new IndexedFileSystem(Paths.get("data/fs", Integer.toString(releaseNo)), true);
|
||||||
World.getWorld().init(releaseNo, fs, manager);
|
World.getWorld().init(releaseNo, fs, manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ public final class IndexedFileSystem implements Closeable {
|
|||||||
int nextType = header[7] & 0xFF;
|
int nextType = header[7] & 0xFF;
|
||||||
|
|
||||||
if (i != curChunk) {
|
if (i != curChunk) {
|
||||||
throw new IOException("Chunk id mismatch.");
|
Preconditions.checkArgument(i == curChunk, "Chunk id mismatch.");
|
||||||
}
|
}
|
||||||
|
|
||||||
int chunkSize = size - read;
|
int chunkSize = size - read;
|
||||||
|
|||||||
Reference in New Issue
Block a user