We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ed4816 commit e426b7dCopy full SHA for e426b7d
csv-validator-ui/src/main/scala/uk/gov/nationalarchives/csv/validator/ui/CsvValidatorUi.scala
@@ -514,7 +514,8 @@ object CsvValidatorUi extends SimpleSwingApplication {
514
fileButton.reactions += {
515
case ev: ButtonClicked =>
516
val startingDir = if(fileTextField.text.isEmpty) userDir.toFile else Path.of(fileTextField.text).toFile
517
- val helpText = s"Select the ${fromPathText.text.split("/").last} folder"
+ val fromFolderName = Path.of(fromPathText.text).getFileName
518
+ val helpText = s"Select the ${fromFolderName} folder"
519
val fileChooser = new FileChooser(startingDir)
520
fileChooser.title = helpText
521
fileChooser.fileSelectionMode = SelectionMode.DirectoriesOnly
0 commit comments