Fix error when purging a map but the directory is already deleted. Fixes: #490

This commit is contained in:
Lukas Rieger (Blue) 2023-11-18 16:32:05 +01:00
parent 28c9166030
commit 5f0942a8ae
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -191,6 +191,8 @@ public void deleteMeta(String mapId, String name) throws IOException {
@Override
public void purgeMap(String mapId, Function<ProgressInfo, Boolean> onProgress) throws IOException {
final Path directory = getFilePath(mapId);
if (!Files.exists(directory)) return;
final int subFilesCount;
final LinkedList<Path> subFiles;