Add additional logging to getFileBasePath

This commit is contained in:
James Seibel
2022-03-30 19:56:58 -05:00
parent 5a58fa92b3
commit e3018485ed
2 changed files with 9 additions and 8 deletions
@@ -89,10 +89,8 @@ public class LodDimensionFinder
public void AttemptToDetermineSubDimensionAsync(IDimensionTypeWrapper dimensionTypeWrapper)
{
// prevent multiple threads running at the same time
boolean v = determiningWorldFolder.getAndSet(true);
if (v) {
if (determiningWorldFolder.getAndSet(true))
return;
}
// run asynchronously since this could take a while
Thread thread = new Thread(() ->
@@ -242,12 +242,15 @@ public class LodDimensionOldFileStructureHandler
renameOldFileStructure(vertQual, OldDistanceGenerationMode.FULL);
}
private String getFileBasePath() {
try {
private String getFileBasePath()
{
try
{
return dimensionDataSaveFolder.getCanonicalPath() + File.separatorChar;
} catch (IOException e) {
ApiShared.LOGGER.warn("Unable to get the base save file path. One possible cause is that"
+ " the process failed to read the current path location due to security configs.");
}
catch (IOException e)
{
ApiShared.LOGGER.warn("Unable to get the base save file path. Error: " + e.getMessage(), e);
throw new RuntimeException("DistantHorizons Get Save File Path Failure");
}
}