Skip to content

Commit

Permalink
Simplify photos_and_videos dir detection
Browse files Browse the repository at this point in the history
  • Loading branch information
addshore committed Feb 23, 2019
1 parent 786157d commit ce8b541
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void handle(ActionEvent t){

String dirPathString = dirInput.getText();

if( dirPathString.length() < "photos_and_videos".length() || !dirPathString.substring(dirPathString.length() - "photos_and_videos".length()).equals("photos_and_videos")) {
if(!dirPathString.endsWith( "photos_and_videos" )) {
Alert alert = new Alert(Alert.AlertType.ERROR, "Directory must be your photos_and_videos directory", ButtonType.OK);
alert.showAndWait();
return;
Expand Down

0 comments on commit ce8b541

Please sign in to comment.