mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
test loading fxml with system specific file separator
This commit is contained in:
parent
dab6b9663a
commit
28722d385b
1 changed files with 4 additions and 1 deletions
|
@ -25,12 +25,12 @@ import javafx.scene.layout.BorderPane;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import org.controlsfx.control.textfield.CustomPasswordField;
|
import org.controlsfx.control.textfield.CustomPasswordField;
|
||||||
import org.controlsfx.control.textfield.TextFields;
|
|
||||||
import org.controlsfx.glyphfont.FontAwesome;
|
import org.controlsfx.glyphfont.FontAwesome;
|
||||||
import org.controlsfx.glyphfont.Glyph;
|
import org.controlsfx.glyphfont.Glyph;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
@ -91,6 +91,9 @@ public class WalletController extends WalletFormController implements Initializa
|
||||||
try {
|
try {
|
||||||
if(!existing) {
|
if(!existing) {
|
||||||
URL url = AppServices.class.getResource("wallet/" + function.toString().toLowerCase() + ".fxml");
|
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) {
|
if(url == null) {
|
||||||
throw new IllegalStateException("Cannot find wallet/" + function.toString().toLowerCase() + ".fxml");
|
throw new IllegalStateException("Cannot find wallet/" + function.toString().toLowerCase() + ".fxml");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue