Querz / mcaselector

A tool to select chunks from Minecraft worlds for deletion or export.
MIT License
3.25k stars 178 forks source link

Handle missing cache version file for new worlds #305

Closed ShirleyNekoDev closed 2 years ago

ShirleyNekoDev commented 2 years ago

When a world is loaded for the first time, the belonging cache directory does not exist yet. Therefore when trying to read the cache version file, a FileNotFoundException is thrown and dumped into the log/stdout.

This PR adds a check for the existence of such a version file, before reading it. The resulting behavior stays the same for both cases (existence and non-existance), only the error handing is cleaner (IMHO).