mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Update Upstream
55e2d3d Catch InvalidPathException in safeFile handler (2167) Closes #1872
This commit is contained in:
parent
129f4f37a3
commit
5c2679f95d
@ -85,6 +85,7 @@ import java.io.FileInputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.nio.file.InvalidPathException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -369,7 +370,7 @@ public final class WorldEdit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return filePath.toFile();
|
return filePath.toFile();
|
||||||
} catch (IOException e) {
|
} catch (IOException | InvalidPathException e) {
|
||||||
throw new FilenameResolutionException(filename, Caption.of("worldedit.error.file-resolution.resolve-failed"));
|
throw new FilenameResolutionException(filename, Caption.of("worldedit.error.file-resolution.resolve-failed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user