Skip to content

Commit

Permalink
🐛 Fix image source path with space in the name
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Oct 17, 2023
1 parent 8ceb0b7 commit 87d6872
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ public ImageRef buildImageRef(Tools5eIndex index, JsonMediaHref mediaHref, Strin
.build();
}
if (mediaHref.href.path != null) {
Path sourcePath = Path.of("img", mediaHref.href.path);
Path sourcePath = Path.of("img",
mediaHref.href.path.replace("%20", " "));

String fileName = sourcePath.getFileName().toString();
if (type == Tools5eIndexType.deity || type == Tools5eIndexType.note || type == Tools5eIndexType.variantrule) {
Expand Down

0 comments on commit 87d6872

Please sign in to comment.