mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +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();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ public final class IndexedFileSystem implements Closeable {
|
||||
int nextType = header[7] & 0xFF;
|
||||
|
||||
if (i != curChunk) {
|
||||
throw new IOException("Chunk id mismatch.");
|
||||
Preconditions.checkArgument(i == curChunk, "Chunk id mismatch.");
|
||||
}
|
||||
|
||||
int chunkSize = size - read;
|
||||
|
||||
Reference in New Issue
Block a user