mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
Parse release number properly, use Preconditions in IndexedFileSystem.
This commit is contained in:
1 parent
5814c5b44f
commit
649dcfc239
2 files changed
+2
-2
No files matched your search
@@ -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