Skip to content

Commit 759f364

Browse files
authored
Use a more robust relative path setup in the schematic list (#2892)
1 parent 5173bdd commit 759f364

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ public Component getComponent(int number) {
494494

495495
String path = inRoot
496496
? file.getFileName().toString()
497-
: file.toString().substring(rootDir.toString().length());
497+
: rootDir.relativize(file).toString();
498498

499499
return TextComponent.builder()
500500
.content("")

0 commit comments

Comments
 (0)