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
1 changed files with 2 additions and 0 deletions

View File

@ -191,6 +191,8 @@ public class FileStorage extends Storage {
@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;