Skip to content

Commit

Permalink
Merge pull request #33 from gamerson/pr-66
Browse files Browse the repository at this point in the history
rename
  • Loading branch information
gamerson authored Jun 29, 2016
2 parents 114e7cd + a64df7a commit 4836419
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,14 @@ private boolean isExistingTemplate(String templateName) throws Exception

private boolean isTextFile(File dest) {
String name = dest.getName();
int index = name.lastIndexOf(".");

return textExtensions.contains(
name.substring(name.lastIndexOf("."), name.length()));
if ( index > -1 ) {
return textExtensions.contains(
name.substring(index, name.length()));
}

return false;
}

private void listTemplates() throws Exception {
Expand Down

0 comments on commit 4836419

Please sign in to comment.