full data DTO close data source if corrupted

This commit is contained in:
James Seibel
2025-07-10 22:24:33 -05:00
parent 5b10263f82
commit 618ad1938b
@@ -142,7 +142,16 @@ public class FullDataSourceV2DTO
public FullDataSourceV2 createDataSource(@NotNull ILevelWrapper levelWrapper) throws IOException, InterruptedException, DataCorruptedException
{
FullDataSourceV2 dataSource = FullDataSourceV2.createEmpty(this.pos);
this.internalPopulateDataSource(dataSource, levelWrapper, false);
try
{
this.internalPopulateDataSource(dataSource, levelWrapper, false);
}
catch (Exception e)
{
dataSource.close();
throw e;
}
return dataSource;
}