Skip to content

Commit 7b34a93

Browse files
committed
Cleanup
1 parent 6eae46a commit 7b34a93

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

common/src/main/java/dev/ryanhcode/sable/SableServerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public final class SableServerConfig {
1717
.defineInRange("sub_level_substeps_per_tick", 2, 1, 10);
1818

1919
SUB_LEVEL_STORAGE_PRUNING = builder
20-
.comment("Prunes and deletes empty sub-level storage files")
20+
.comment("Prunes and deletes empty sub-level storage files. Experimental.")
2121
.define("sub_level_storage_pruning", false);
2222

2323
SPEC = builder.build();

common/src/main/java/dev/ryanhcode/sable/sublevel/storage/serialization/SubLevelStorage.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,11 @@ public void pruneCache() throws IOException {
295295
final SubLevelStorageFile storageFile = storageFiles.next();
296296

297297
if (storageFile.isEmpty()) {
298-
if (SableServerConfig.SUB_LEVEL_STORAGE_PRUNING.get())
298+
if (SableServerConfig.SUB_LEVEL_STORAGE_PRUNING.get()) {
299299
storageFile.delete();
300-
else
300+
} else {
301301
storageFile.close();
302+
}
302303
storageFiles.remove();
303304
}
304305
}
@@ -309,10 +310,11 @@ public void pruneCache() throws IOException {
309310
final SubLevelRegionFile regionFile = regionFiles.next();
310311

311312
if (regionFile.isEmpty()) {
312-
if (SableServerConfig.SUB_LEVEL_STORAGE_PRUNING.get())
313+
if (SableServerConfig.SUB_LEVEL_STORAGE_PRUNING.get()) {
313314
regionFile.delete();
314-
else
315+
} else {
315316
regionFile.close();
317+
}
316318
regionFiles.remove();
317319
}
318320
}

0 commit comments

Comments
 (0)