replace forward slash with underscore in file names when saving psbts

This commit is contained in:
Craig Raw 2024-11-12 08:48:50 +02:00
parent d731f7296b
commit 1e0c0c1c75
2 changed files with 2 additions and 1 deletions

View file

@ -798,6 +798,7 @@ public class AppController implements Initializable {
String fileName = ((Label)selectedTab.getGraphic()).getText();
if(fileName != null && !fileName.isEmpty()) {
fileName = fileName.replace('/', '_');
if(!fileName.endsWith(".psbt")) {
fileName += ".psbt";
}

View file

@ -993,7 +993,7 @@ public class HeadersController extends TransactionFormController implements Init
fileChooser.setTitle("Save PSBT");
if(headersForm.getName() != null && !headersForm.getName().isEmpty()) {
fileChooser.setInitialFileName(headersForm.getName() + ".psbt");
fileChooser.setInitialFileName(headersForm.getName().replace('/', '_') + ".psbt");
}
AppServices.moveToActiveWindowScreen(window, 800, 450);