From 28722d385b5f700aae8190be3ca4b541a677e7d1 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 28 Jul 2022 15:11:59 +0200 Subject: [PATCH] test loading fxml with system specific file separator --- .../com/sparrowwallet/sparrow/wallet/WalletController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java index 2ff5914c..c201d214 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java @@ -25,12 +25,12 @@ import javafx.scene.layout.BorderPane; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import org.controlsfx.control.textfield.CustomPasswordField; -import org.controlsfx.control.textfield.TextFields; import org.controlsfx.glyphfont.FontAwesome; import org.controlsfx.glyphfont.Glyph; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.File; import java.io.IOException; import java.net.URL; import java.util.ResourceBundle; @@ -91,6 +91,9 @@ public class WalletController extends WalletFormController implements Initializa try { if(!existing) { URL url = AppServices.class.getResource("wallet/" + function.toString().toLowerCase() + ".fxml"); + if(url == null) { + url = AppServices.class.getResource("wallet" + File.separator + function.toString().toLowerCase() + ".fxml"); + } if(url == null) { throw new IllegalStateException("Cannot find wallet/" + function.toString().toLowerCase() + ".fxml"); }