feat: validate world saves
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
@ -39,7 +39,7 @@
|
||||
|
||||
#include <QMutex>
|
||||
|
||||
enum ShaderPackFormat {
|
||||
enum class ShaderPackFormat {
|
||||
VALID,
|
||||
INVALID
|
||||
};
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
class Version;
|
||||
|
||||
enum WorldSaveFormat {
|
||||
enum class WorldSaveFormat {
|
||||
SINGLE,
|
||||
MULTI,
|
||||
INVALID
|
||||
|
@ -121,6 +121,9 @@ bool processZIP(WorldSave& save, ProcessingLevel level)
|
||||
|
||||
auto [ found, save_dir_name, found_saves_dir ] = contains_level_dat(zip);
|
||||
|
||||
if (save_dir_name.endsWith("/")) {
|
||||
save_dir_name.chop(1);
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user