Skip to content

Commit

Permalink
Merge pull request #67 from Ashy8682/master
Browse files Browse the repository at this point in the history
  • Loading branch information
IMB11 authored May 25, 2024
2 parents 5c32ef4 + 21cf49d commit a8eabf1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ public boolean validate() {
return urlValidator.isValid(widget.getText());
}
case FILE -> {
String txt = widget.getText();
if (txt.indexOf(":") == txt.length() - 1) {
return false;
}
if (txt.length() > 1) {
if (txt.substring(0, 1).equals("\"") && txt.substring(txt.length() - 1, txt.length()).equals("\"")) {
widget.setText(txt.substring(1, txt.length() - 1));
}
}
return isValidFilePath(widget.getText());
}
case RESOURCE_LOCATION -> {
Expand Down

0 comments on commit a8eabf1

Please sign in to comment.