From 5f0942a8ae7185299a6a65f04cd675f7375da6c9 Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Sat, 18 Nov 2023 16:32:05 +0100 Subject: [PATCH] Fix error when purging a map but the directory is already deleted. Fixes: #490 --- .../de/bluecolored/bluemap/core/storage/file/FileStorage.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java index 74c0244f3..2f5f92967 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java @@ -191,6 +191,8 @@ public void deleteMeta(String mapId, String name) throws IOException { @Override public void purgeMap(String mapId, Function onProgress) throws IOException { final Path directory = getFilePath(mapId); + if (!Files.exists(directory)) return; + final int subFilesCount; final LinkedList subFiles;