Update Upstream

55e2d3d Catch InvalidPathException in safeFile handler (2167)

Closes #1872
This commit is contained in:
Alexander Brandes 2022-08-10 09:47:53 +02:00
parent 129f4f37a3
commit 5c2679f95d
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C

View File

@ -85,6 +85,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;
@ -369,7 +370,7 @@ public final class WorldEdit {
}
return filePath.toFile();
} catch (IOException e) {
} catch (IOException | InvalidPathException e) {
throw new FilenameResolutionException(filename, Caption.of("worldedit.error.file-resolution.resolve-failed"));
}
}